主权项 |
1. A method of improving memory management in a hybrid programming environment, the method comprising:
receiving, by a server program, a request to execute a script, wherein the server program instructs an embedded script engine to execute the script; creating, by the server program, a session manager to manage objects associated with the execution of the script, wherein the objects are comprised of host objects and script objects, wherein the host objects reside in a program memory space, and the script objects reside in an embedded script engine memory space; creating, by the session manager, a session associated with the execution of the script, wherein objects created during the execution of the script are associated with the session; and upon receiving notification of at least one of completion and termination of the execution of the script, requesting, by the server program, at least one of invalidation and deletion of the objects associated with the session, wherein immediate deletion of host objects immediately releases memory in the program memory space without waiting for a scheduled memory management mechanism performed by the embedded script engine. |