News for hackers. Stuff that matters.
Re:Python overtakes Java to become the second-most popular p... by dekhn on Thursday November 05, 2020 @10:21AM (#24998975)
I've used 'import gc' in python programs. gc.get_referers and gc.get_referents is very helpful.
Re:Python overtakes Java to become the second-most popular p... by iainctduncan on Thursday November 05, 2020 @10:24AM (#24999011)
I'm guessing you've been doing this for a while though... when you see that in a code base that you know has major issues and was made by fairly new programmers, it's like "oh god please tell me that doesn't mean garbage collector, I'm going to need a stiff drink"... :-)
Re:Python overtakes Java to become the second-most popular p... by dekhn on Thursday November 05, 2020 @11:29AM (#24999560)
yes, I have been doing 'import gc' for 20 years. Well, technically, I stopped about 15 years ago because I haven't had any unexpected references hanging around for that long.
Re:Python overtakes Java to become the second-most popular p... by fulafel on Thursday November 05, 2020 @10:50AM (#24999251)
gc.get_stats() too.