mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Don't use deprecated +leak: method.
This commit is contained in:
parent
25505b2e67
commit
8b0543571b
4 changed files with 30 additions and 17 deletions
|
@ -786,7 +786,7 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
NSTimer *timer;
|
||||
SEL sel;
|
||||
#ifdef RL_INTEGRATE_DISPATCH
|
||||
GSMainQueueDrainer *drain;
|
||||
static GSMainQueueDrainer *drainer = nil;
|
||||
#endif
|
||||
|
||||
ctr = [NSNotificationCenter defaultCenter];
|
||||
|
@ -810,17 +810,20 @@ static inline BOOL timerInvalidated(NSTimer *t)
|
|||
[current addTimer: timer forMode: NSDefaultRunLoopMode];
|
||||
|
||||
#ifdef RL_INTEGRATE_DISPATCH
|
||||
/* We leak the queue drainer, because it's integral part of RL
|
||||
* operations
|
||||
*/
|
||||
drain = [NSObject leak: [[GSMainQueueDrainer new] autorelease]];
|
||||
if (nil == drainer)
|
||||
{
|
||||
/* We leak the queue drainer, because it's integral part of RL
|
||||
* operations
|
||||
*/
|
||||
drainer = [GSMainQueueDrainer new];
|
||||
}
|
||||
[current addEvent: [GSMainQueueDrainer mainQueueFileDescriptor]
|
||||
#ifdef _WIN32
|
||||
type: ET_HANDLE
|
||||
#else
|
||||
type: ET_RDESC
|
||||
#endif
|
||||
watcher: drain
|
||||
watcher: drainer
|
||||
forMode: NSDefaultRunLoopMode];
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue