Fix for cache memory segment being destructed