NSDatePicker leaking in graphical mode?
NSDatePicker leaking in graphical mode?
- Subject: NSDatePicker leaking in graphical mode?
- From: Oliver Quas <email@hidden>
- Date: Sun, 16 Jul 2006 17:18:39 +0200
Hi list,
i have a strange behaviour when using a NSDatePicker in my application.
The NSDatePicker instance is set to the graphical view without time
selection, to get a calendar view as seen in iPhoto on the bottom left.
when i programmatically set
[myDatePicker setCalendar:[[NSCalendar currentCalendar] autorelease]];
[myDatePicker setDate:(NSDate *)[NSCalendarDate calendarDate]];
[myDatePicker setDelegate:self; // self is an instance of the default
document class MyDocument
( assumed there is an IBOutlet connected to the NSDatePicker named
"myDatePicker" )
the NSDatePicker is leaking like hell.
Proof: If i comment out those lines, everything get's back to normal.
no leaks.
In my application, the view that contains the NSDatePicker is
programmatically added to a NSSplitView. Once the NSAnimation starts
to 'move-in' the view, the number of leaks increase. Even when i
manually drag the NSSplitView divider, the number increases.
It seems to me, there is a bug in NSDatePicker (and also in its cell
class): every time the NSDatePicker needs display, it tries to set
the date values on its cells. I guess they somehow retain the
previous date value without releasing it.
Has anyone else recognized this? And is there anything i can do to
prevent this issue?
I use the latest release of Xcode (version 2.3). The application is a
universal binary and my development machine is PowerPC based.
Thanks in advance,
Oliver
Hi list,
i have a strange behaviour when using a NSDatePicker in my application.
The NSDatePicker instance is set to the graphical view without time
selection, to get a calendar view as seen in iPhoto on the bottom left.
when i programmatically set
[myDatePicker setCalendar:[[NSCalendar currentCalendar] autorelease]];
[myDatePicker setDate:(NSDate *)[NSCalendarDate calendarDate]];
[myDatePicker setDelegate:self; // self is an instance of the default
document class MyDocument
( assumed there is an IBOutlet connected to the NSDatePicker named
"myDatePicker" )
the NSDatePicker is leaking like hell.
Proof: If i comment out those lines, everything get's back to normal.
no leaks.
In my application, the view that contains the NSDatePicker is
programmatically added to a NSSplitView. Once the NSAnimation starts
to 'move-in' the view, the number of leaks increase. Even when i
manually drag the NSSplitView divider, the number increases.
It seems to me, there is a bug in NSDatePicker (and also in its cell
class): every time the NSDatePicker needs display, it tries to set
the date values on its cells. I guess they somehow retain the
previous date value without releasing it.
Has anyone else recognized this? And is there anything i can do to
prevent this issue?
I use the latest release of Xcode (version 2.3). The application is a
universal binary and my development machine is PowerPC based.
Thanks in advance,
Oliver
_______________________________________________
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