NSTextView & Leaking Memory
NSTextView & Leaking Memory
- Subject: NSTextView & Leaking Memory
- From: Chris Ross <email@hidden>
- Date: Sat, 2 Aug 2003 17:12:46 +0100
Hi,
I am completely stumped about this problem. I have a NSTextView
that I am updating by creating an NSMutableAttributedString and using
the [[textView textStorage] setAttributedString:] method.
The attributed string consists of a number of lines of text each
made up from a number of other AttributedStrings each with different
attributes. [on average 6 strings per line].
When the strings have been built and added to the NSTextView. The
display updates.
Now, when I do this a chunk of memory is allocated, when I do it
again (separated with [textView setString:@""]) more memory is
allocated.
The strings never seem to get free'd even though everything sits in
a auto-release pool. 500 lines of the text tends to generate ~6000
objects.
Does anyone know of this problem ? is it me ? How can I force the
attributed strings to be free'd up when the display is cleared ?
This has been driving me up the wall as the program goes from about
5 megs memory usage [RPRVT] to 70 megs overnight.
Any help would be very much recieved,
Regards,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.