• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSTextView memory leak
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView memory leak


  • Subject: NSTextView memory leak
  • From: Keith Wilson <email@hidden>
  • Date: Mon, 20 Mar 2006 04:34:44 +1100

If I create an NSTextView as follows:

textView = [[NSTextView alloc] initWithFrame:rect];
[textView setString:aString];
[textView setFont:aFont];

then MallocDebug reports 88 bytes memory leak.

But if I do the setFont first, eg:

textView = [[NSTextView alloc] initWithFrame:rect];
[textView setFont:aFont];
[textView setString:aString];

then MallocDebug reports no leak.

Why?   Both options look legal to me.

Keith


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Prev by Date: Re: CoreData : fundamental (or not) questions
  • Next by Date: Re: CoreData : fundamental (or not) questions
  • Previous by thread: Fwd: BiDirectional NSLevelIndicator
  • Next by thread: Re: Cocoa-dev Digest, Vol 3, Issue 356
  • Index(es):
    • Date
    • Thread