Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Memory management question
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="Daniel Haude, post: 1672965"] On Tue, 19 Aug 2003 19:34:04 +0000 (UTC), There's really no cure against stupid programming. Of course it'd be easy to implement that into a refcounting scheme as well, but it would require looking through the entire list whenever an external reference is deleted to look if any are left. Or you set up an extra register per list that keeps track of all external references. But then, what if list 1 contains a ref to list 2, and vice versa, and no other external references are left? I can't see a garbage collection system dealing with that kind of situation efficiently. I think that losing all external references to a list is a serious programming error anyway. But even if we wanted to protect a list against this sort of thing happening, it'd be easier and more efficient to add the few necessary lines of *dedicated* code to take care of it instead of relying on a built-in GC system that may or may not do the job properly. --Daniel [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Memory management question
Top