Create locked memory objects using the
method of the memory manager:
$memObject = $memoryManager->createLocked($data);
"Locked" means that such objects are never swapped and unloaded from memory.
Locked objects provides the same interface as movable objects
So locked object can be used in any place instead of movable objects.
It's useful if an application or developer can decide, that some objects should never be swapped, based on performance considerations.
Access to locked objects is faster, because the memory manager doesn't need to track changes for these objects.
The locked objects class (
guarantees virtually the same performance as working with a string
variable. The overhead is a single dereference to get the class property.