DF cleanup memory

Hi there!
I need to reinstantiate DF at runtime. Unfortunaly the number of ‘surviving generations’ (Objects which couldn’t get collected by GC) is raising everytime I refresh the GUI & DF. I’m not 100% sure DF is the reason, though.

I tried to clean up DF with this code

```// Get all tab components
    Component[] comps = tabPane.getComponents();

    for (int i = 0; i < comps.length; i++) {
        Object obj = comps**;
        if (obj instanceof CContentArea) {
            CContentArea ca = (CContentArea) obj;
            CControl ctrl = ca.getControl();
            // Destroy CControl reference
            ctrl.destroy();
            ctrl = null;
            // Destroy contentArea
            ca.removeAll();
            ca = null;
        }
    }```

I guess this is not enough. Is there another way to cleanup all used DF components?

greez chris

I admit, I did not look at this method for a long time, but I’m convinced that this method is not working as it should. I’ll have a close look, but not before next weekend.

NP I’m not in a hurry, thx!

A new version (1.0.7 final) is on the server, as far as I can tell “destroy” should now work.

What was the bug? FlapDockStation needs a “FlapLayoutManager” to arrange its children. The default-FlapLayoutManager add a listener to any FlapDockStation. Unfortunatelly the default-manager was also referenced by a global variable. This global variable (and some other global variables) are now replaced by local references.

Hi Beni!

Thx for the new version of DF. Sry for the late reply.
Unfortunately I’m in a hurry now with my diploma work… :frowning:

It’s slightly better… but my leak still remains. Like I said before, I wasn’t 100% sure DF was the reason.

greez