Castor oil is a vegetable oil derived from the castor bean seed in its purest form. It is colorless, odorless and tasteless.
Encoding globally available pointers helps protect them from being exploited. The EncodePointer function obfuscates the pointer value with a secret so that it cannot be predicted by an external agent. The secret used by EncodePointer is different for each process. A pointer must be decoded before it can be used.
When a dynamically allocated object is created in a piece of code, but the ownership is transfered to a different element it is usually done with pass-by-pointer semantics, or if possible with smart pointers. Side note. It is important to insist in the importance of the difference between C++ and Java references.