Changeset 85195 in webkit


Ignore:
Timestamp:
Apr 28, 2011 9:38:55 AM (13 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called

Reviewed by Simon Fraser.

  • wtf/mac/MainThreadMac.mm:

(WTF::postTimer): Use RetainPtr to plug the leak.

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r85189 r85195  
     12011-04-28  David Kilzer  <ddkilzer@apple.com>
     2
     3        <http://webkit.org/b/59705> WTF::postTimer() leaks a CFRunLoopTimerRef every time it's called
     4
     5        Reviewed by Simon Fraser.
     6
     7        * wtf/mac/MainThreadMac.mm:
     8        (WTF::postTimer): Use RetainPtr to plug the leak.
     9
    1102011-04-27  Sam Weinig  <sam@webkit.org>
    211
  • trunk/Source/JavaScriptCore/wtf/mac/MainThreadMac.mm

    r85036 r85195  
    3434#import <stdio.h>
    3535#import <wtf/Assertions.h>
     36#import <wtf/RetainPtr.h>
    3637#import <wtf/Threading.h>
    3738
     
    9697
    9798    isTimerPosted = true;
    98     CFRunLoopAddTimer(CFRunLoopGetCurrent(), CFRunLoopTimerCreate(0, 0, 0, 0, 0, timerFired, 0), kCFRunLoopCommonModes);
     99    RetainPtr<CFRunLoopTimerRef> runLoopTimer(AdoptCF, CFRunLoopTimerCreate(0, 0, 0, 0, 0, timerFired, 0));
     100    CFRunLoopAddTimer(CFRunLoopGetCurrent(), runLoopTimer.get(), kCFRunLoopCommonModes);
    99101}
    100102
Note: See TracChangeset for help on using the changeset viewer.