One last issue. The memory usage seems rather high. According to my calculations on Mac OS X per line of Richtext added the program uses about 200kb of ram. That adds up fast, and seems like quite a lot for a single line of colored text. Am I supposed to be tNode.Free; -ing or anything like that? I tried it and it caused errors. Is there a way of reducing the amount of ram it gobbles up? What could be causing such high ram usage?
I assume you're looking at Activity Monitor to determine this. In my experience, whether you're using Activity Monitor on Mac or Task Manager on Windows, the amount of RAM a running app appears to be using tends to go up the longer you use the app and rarely goes down when you would expect it to (close and free a large form or document, for example). In fact, I'm not sure how useful this measurement is, other than to show large differences between apps or versions, say. For example, Firefox appears to use a staggering amount of RAM and certainly if you've ever seen it hang while downloading a multi-gig file, then it does appear to run out of RAM.
Another example: 3 GIS apps. After startup, without loading any image or shapefile layers, we see this RAM use:
(1) .NET-based GIS: 19MB
(2) wxWidgets-based GIS: 23MB
(3) QT-based GIS: 95MB
(1) and (2) are close, but (3) is so far beyond them that you wonder what's going on. (Well, it's probably all the Qt libraries getting loaded - for example, QtWebKit4.dll alone is over 10MB in size.)
To determine if what you're seeing is due to memory _leaks_, however, you need to profile your app. With Xcode, you would use Instruments. You might be able to start Instruments independent of Xcode and load your app. But if you don't find sizable leaks, then that's not what's going on. Rather, it's probably related to your app's memory manager and its interactions with system memory allocation.
Thanks.
-Phil