in reply to Re^2: Should I use weaken on an object attribute containing a reference to an object which contains reference back to original object?
in thread Should I use weaken on an object attribute containing a reference to an object which contains reference back to original object?
What the hell are you talking about? I didn't say anything about automatic file deletion. The question being asked is if the OP should be using weaken or not in a data structure that mirrors a file system.
haj pointed out that you get memory leaks if you comment out weaken. And I pointed out that you can end up with premature deallocation if you don't. The point I was making is that just adding weaken is not a solution, or at least not one without downsides.
Perl's reference-counting GC makes bidirectional data structures very hard to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Should I use weaken on an object attribute containing a reference to an object which contains reference back to original object?
by LanX (Saint) on Jan 23, 2024 at 03:37 UTC | |
by ikegami (Patriarch) on Jan 23, 2024 at 03:41 UTC |