Patent ID: 7472144

Claim:
A method in a resource deallocation module of releasing resources of a user session operating in a software environment that includes an automatic memory management algorithm executed by a garbage collector, the method comprising: using the resource deallocation module, detecting an impending execution of the automatic memory management algorithm by the garbage collector for removing user session objects created for the user session that are not referenced by a remaining object and which do not reference one or more external resources; responsive to the detecting and prior to executing the automatic memory management algorithm by the garbage collector, removing any obsolete references of the user session objects by: accessing, by the resource deallocation module, a first user session object of said user session objects of the user session and traversing an object graph; identifying, by the resource deallocation module, one or more obsolete external resource references of said first user session object, wherein said one or more obsolete external resource references have not been released by said first user session object; using the resource deallocation module, releasing said one or more obsolete external resource references by a set of rules for said first user session object; and repeating the accessing, identifying, and releasing, by the resource deallocation module, for each user session object of said user session objects of the user session, thereby removing any obsolete references of the user session objects prior to invoking said automatic memory management algorithm for removing said user session objects created for said user session that are not referenced by a remaining object and which do not reference one or more external resources.