1. A method comprising: changing a non-shared closure to a shared closure having shareable objects by removing, from each non-shareable object in the non-shareable closure, content that causes each non-shareable object to be non-shareable, wherein the non-shared closure is in a shared memory, and wherein the shareable objects are accessible by at least one virtual machine; serializing, from the shared closure, each shareable object that was previously non-shareable; and de-serializing, from the shared closure, each shareable object that was previously non-shareable.