Article Preview
Buy Now
FEATURE
Improve WeakRef Performance
Cache WeakRefs to gain speed
Issue: 15.5 (September/October 2017)
Author: Thomas Tempelmann
Author Bio: Thomas is a long-time Xojo developer. This article is an updated version of a post that originally appeared on his website (http://blog.tempel.org).
Article Description: No description available.
Article Length (in bytes): 8,937
Starting Page Number: 13
Article Number: 15503
Related Web Link(s):
http://blog.tempel.org
http://developer.xojo.com/userguide/weak-references
Excerpt of article text...
A common programming technique to organize data is the use of
tree structures , which are built aslinked lists . Trees are great for hierarchical data, such as files and folders. (See theWhat's a Linked List? sidebar for more info.)But the traditional structure of building trees with leaves (children) that keep a reference to the branch (ancestor, parent) they're attached to, can cause some serious problems. The simplest—but not smartest—solution is to store a direct reference to the parent object in the child object.
Imagine this node class:
class Person
property name as String
...End of Excerpt. Please purchase the magazine to read the full article.