Salesforce

Memory leak when a Progress Class implements a .NET interface

« Go Back

Information

 
TitleMemory leak when a Progress Class implements a .NET interface
URL Namememory-leak-when-a-progress-class-implements-a-net-interface
Article Number000114470
EnvironmentProduct: OpenEdge
Version: 11.3.2, 11.7.x
OS: Windows
Other:
Question/Problem Description
Memory leak when a Progress Class implements a .NET interface

A memory leak can happen when using an ABL class that implements a .Net interface.  The same memory leak does not happen when an ABL class inherits from a .Net base class.  For example a class defined in the following way that is called many times triggers a memory leak:
 
class Classes.WithMemoryLeak.SomeClass implements Classes.Util.SomeOtherClass:

For some reason classes defined this way are not garbage collected when they are no longer needed.  In comparison if a class is defined as inheriting from a base class:
 
class Classes.WithoutMemoryLeak.SomeClass inherits Classes.Util.SomeOtherClass:

The problem doesn't occur.
Steps to Reproduce
Clarifying Information
The problem cannot be seen with 4GLTrace and DynObjects.* client logging.  It also isn't visible with the debugger Dynamic Objects Monitoring feature enabled.

The code uses DELETE OBJECT, so the objects should be deleted.  But some .Net classes are not being garbage collected.  The problem can be seen in 3rd party tools like the Ants profiler or YourKit.  Taking a memory snapshot after the point the objects should have been deleted, shows there are many instances of the class that implements another class, still in memory.  

 
Error Message
Defect NumberDefect PSC00359716
Enhancement Number
Cause
When deleting ABL classes, any references to .Net objects were not being freed internally.  This caused the memory leak.  

 
Resolution
Upgrade to OpenEdge 11.7.3 or later.  
Workaround
Notes
Keyword Phrase
Last Modified Date3/30/2020 3:14 PM

Powered by