Kbase P184057: Garbage Collection not occurring on AppServer when classes are defined in the Entry Point procedure
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  3/11/2011 |
|
Status: Unverified
SYMPTOM(s):
Garbage Collection not occurring on AppServer when classes are defined in the Entry Point procedure
Classes instantiated on AppServer are not garbage collected
When a class variable is defined in the entry point procedure of an AppServer call, its usage count is not decremented when that call completes
Sample code to reproduce:
/* Save the following as a file named SimpleClass.cls */
CLASS SimpleClass:
DESTRUCTOR PUBLIC SimpleClass ():
MESSAGE "In Destructor" VIEW-AS ALERT-BOX.
END DESTRUCTOR.
END CLASS.
/* Save the following as a file named testSimpleClass.p in the AppServer's working directory */
DEFINE VARIABLE oSimpleClass AS SimpleClass NO-UNDO.
oClass = NEW SimpleClass().
- Run testSimpleClass.p on an AppServer.
- Take a look at the AppServer.server.log file. Note that the message from the destructor didn't fire.
- Using proGetStack <pid> from a proenv shell produces a protrace file which shows that SimpleClass.cls is still in the session's stack
FACT(s) (Environment):
Running the same test on the client shows that the class gets cleaned up
All Supported Operating Systems
OpenEdge 10.2B
CAUSE:
This problem only occurs when the variable definition for the class is in the body of the entry point procedure for the AppServer call.
CAUSE:
Bug# OE00205649
FIX:
If you move the definition and instantiation of the variable to an internal, or separate external, procedure the problem doesn't occur.