Article Preview
Buy Now
COLUMN
Object-Oriented Thinking
Issue: 1.4 (February/March 2003)
Author: Charles Yeomans
Author Bio: Charles Yeomans is a software developer in Lexington, Kentucky
Article Description: No description available.
Article Length (in bytes): 5,236
Starting Page Number: 36
Article Number: 1418
Related Web Link(s):
http://developer.java.sun.com/developer/TechTips/2000/tt0124.html
Excerpt of article text...
A fundamental task of any modern object-oriented language is that it handle memory management. REALbasic performs this task using a scheme called reference counting. For every object created, RB keeps a count of references to that object; when the count reaches 0, RB destroys the object and reclaims the memory used.
Reference counting has a notable weakness; it cannot reclaim circular structures. If one or more objects refer to each other, then their reference counts will never go to 0, and so their memory will never be reclaimed by RB. Here is perhaps the simplest possible example.
Sub LeakOneObject()
dim person as cPerson
...End of Excerpt. Please purchase the magazine to read the full article.