Jak testovat memory leak


    Object obj = ....;
    WeakReference ref = new WeakReference(obj);
    obj = null;
    assertGC ("The object can be released", ref);
(assertGC – knihovna z NetBeans)
 
www.softeu.cz
21/30