4 ms·
What does no garbage collector actually mean ?
by MiroslavPokorny 2mo ago
What does no garbage collector actually mean ?
- joas_coder 2mo agopublic class Hello { public static void main(String[] args) { Chatter chatter = new Chatter(); String text = "Hello " + chatter.getWord() + "!"; System.out.println(text); free text; // destroy object and reclaim the memory free chatter; // destroy object and reclaim the memory // System.out.println(chatter); // use after free NEVER compiles } } // OR: public class Hello { public static void main(String[] args) { Chatter chatter = new Chatter(); defer free chatter; String text = "Hello " + chatter.getWord() + "!"; defer free text; System.out.println(text); } }
- UncleMeat 2mo agoHow does a UAF never compile without whole program lifetime and alias analysis?
- joas_coder 2mo ago[flagged]