Resize-window memory leak? (Was: [OT] Re: Don't leak memory!!)
Resize-window memory leak? (Was: [OT] Re: Don't leak memory!!)
- Subject: Resize-window memory leak? (Was: [OT] Re: Don't leak memory!!)
- From: Oliver Donald <email@hidden>
- Date: Fri, 21 Nov 2003 09:34:18 -0000
Speaking of using Top to spot memory leaks...
My current app's memory usage slowly but surely creeps ever-upwards whenever
I resize the window. It contains a customView who's drawRect: method only
uses [NSBezierPath strokeLineFromPoint:toPoint:] and [NSColor
colorWithCalibratedRed:green:blue:alpha:]. The source is a plain C array of
structures. But the memory goes usage up every second or so of resize
dragging. Is this normal? The memory doesn't ever seem to get released!
I am assuming that [NSBezierPath strokeLineFromPoint:toPoint:] is
autoreleased? [NSColor colorWithCalibratedRed:green:blue:alpha:] is a 'with'
method, so that should be auto-release also?
-----Original Message-----
From: j o a r [
mailto:email@hidden]
Sent: 21 November 2003 06:44
To: Jens Bauer
Cc: Cocoa Development
Subject: [OT] Re: Don't leak memory!!
The problem with loosing NSUserDefaults based preferences when the disk
is full is a known problem. Is this on Jaguar or Panther? I was hoping
that they would have fixed it for Panther...
File a bug report for NSUserDefaults. It will be marked as a duplicate,
but it would still be good as it makes Apple more aware of that
particular problem.
Problems with memory leaks is going to be more important on Panther,
since people will keep their applications running for longer periods of
time - as they can use Fast User Switching instead of logging out. It
really is important to keep memory leaks in your applications to a
minimum. Use "top" to find applications that are leaking memory. Look
at the rightmost column, if it is growing a lot over time it could be a
memory leak that should be reported to the developer of that app. Check
in the list archives for instructions on how to use the "leaks" tool
for finding memory leaks in your own applications.
j o a r
On 2003-11-21, at 02.53, Jens Bauer wrote:
>
I'd like to suggest something very important.
>
>
*DO NOT LEAK MEMORY* !
>
>
I was victim for a quick memory-leak, and because Mail.app couldn't
>
allocate memory for its preferences (that it keeps reading and writing
>
all the time), I lost..
>
1: All my email account settings
>
2: A bunch of mailboxes (one for an entire email account, yep!)
>
3: Preferences in Finder (as usual!)
>
4: Some iTunes preferences
>
5: Who knows?
>
>
If you want to avoid problems, try always keeping 50% of your disk
>
free.
>
>
Finder said that 1.8GB of the disk was free, but SSH'ing from another
>
machine into the machine that it happened with, df told me something
>
different; 100% was used, very few blocks were free.
>
I don't even know what to say in the bug-report yet...
>
>
-Some of you may know it already, but the rest, I'd like to say that
>
it's a serious problem, and when you see the alert telling you to
>
close applications, it may already be too late!
>
>
May it never happen to you!
[demime 0.98b removed an attachment of type application/pkcs7-signature
which had a name of smime.p7s]
_______________________________________________
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.
DISCLAIMER: The information contained in this e-mail is confidential and may
be privileged. It is intended for the addressee only. If you are not the
intended recipient, please delete this e-mail immediately. The contents of
this email must not be disclosed or copied without the sender's consent. We
cannot accept any responsibility for viruses, so please scan all
attachments. The statements and opinions expressed in this message are those
of the author and do not necessarily reflect those of the company. The
company does not take any responsibility for the views of the author.
_______________________________________________
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.