Skip to content

Commit dc6e892

Browse files
authored
Update entity_cache.hpp
entity_cache::grow cannot reset pointer for heap
1 parent b2c8557 commit dc6e892

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rtb/datacache/entity_cache.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ class entity_cache
286286

287287
void grow_memory(size_t size) const {
288288
try {
289-
_segment_ptr.reset() ;
289+
if constexpr ( !std::is_same_v<segment_t, boost::interprocess::managed_heap_memory> ) {
290+
_segment_ptr.reset() ;
291+
}
290292
Memory::grow(_segment_ptr, _store_name.c_str(), size) ;
291293
} catch ( const bad_alloc_exception_t &e ) {
292294
LOG(debug) << boost::core::demangle(typeid(*this).name())

0 commit comments

Comments
 (0)