1. A system employing a processor for the management of memory that executes code in real time, comprising: a stack that comprises a plurality of object references, wherein a respective object reference references a location of a corresponding object in a memory heap, wherein a subset of the objects is utilized by managed code and a subset of the objects is utilized by unmanaged code; and an execution engine that automatically identifies existence of an unsafe condition for the subset of the objects utilized by the managed code and pins the object references within the stack corresponding to the subset of objects utilized by the managed code, the unsafe condition includes at least one of a predefined criteria that will result in a failure or a call to unmanaged code that manipulates managed data.