1. A method for managing memory for an application using a computer, wherein the computer performs actions, including: executing a managed application in a managed runtime environment; generating one or more managed peer objects that correspond to one or more native objects that are executing in a native runtime environment, wherein memory is allocated for the one or more managed peer objects; generating one or more garbage collection handles, wherein each garbage collection handle is associated with one of the one or more managed peer objects; and when the managed application executes one or more instructions that interact with the one or more managed peer objects and the native runtime environment, performing further actions, including: modifying each garbage collection handle associated with the one or more managed peer objects based on a type of an interaction; registering the one or more managed peer objects with a managed runtime memory manager; and when a garbage collection event occurs, deallocating memory for the one or more managed peer objects based in part on its correspondent garbage collection handle.