How to free the memory used by a plugin after it closes?

Hi guys
In normal Java applications when you close the application (when its process finished) the used memory will free automatically by the garbage collector
But how about our custom plugins in Visual Paradigm? I have a plugin that uses a lot of memory while it processing but the part of the memory used by this plugin will not free when the process of plugin finishes. Closing the Visual Paradigm will free that part of memory but I want to know how can I free that memory without having to close the Visual Paradigm?

Hi Mamad,

Thank you for your inquiry. I have forwarded your questions to our engineers to study. When there is any news, I will let you know.

Best regards,
Jick Yeung

Hi Mamad,

Please make sure your objects can be freed by garbage collection, and this depends on how you implement your plugin. The following code example demonstrates how to free data:

class MyAction implement VPActionController {
private Object myData = null;

public void performAction(VPAction action) {
    this.myData = loadBigContent();

    doSomethingWithTheData(this.myData);

    this.myData = null; // <--- remove the reference. Then, the Big-Content can freed by garbage collection.
}

}

Best regards,
Jick Yeung

Thanks @Jick