<div>Most of the callbacks to platform code are documented here</div><div><br></div><div><a href="https://isqueak.org/PlatformVMAPI">https://isqueak.org/PlatformVMAPI</a><br></div><div><br></div><div id="protonmail_signature_block" class="protonmail_signature_block"><div><font face="arial, sans-serif"><span style="font-size:12.800000190734863px;background-color:rgb(255,255,255);">....</span></font></div><div><span class="highlight" style="background-color:rgb(255,255,255);"><span class="colour" style="color:rgb(34,34,34);"><span class="font" style="font-family:arial, sans-serif;"><span class="size" style="font-size:12.800000190734863px;">John M. McIntosh. Corporate Smalltalk Consulting Ltd </span></span></span></span><a style="font-style:normal;font-weight:normal;letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;color:rgb(17,85,204);font-family:arial, sans-serif;font-size:12.800000190734863px;" href="https://www.linkedin.com/in/smalltalk">https://www.linkedin.com/in/smalltalk</a><br></div></div> <div><br></div><div><br></div><div id="protonmail_mobile_signature_block">Sent from ProtonMail Mobile</div> <div><br></div><div><br></div>On Sat, Mar 2, 2019 at 09:20, maenu <<a href="mailto:notifications@github.com" class="">notifications@github.com</a>> wrote:<blockquote class="protonmail_quote" type="cite">  <p>Instead of the PR <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="415537103" data-permission-text="Issue title is private" data-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/373" data-hovercard-type="pull_request" data-hovercard-url="/OpenSmalltalk/opensmalltalk-vm/pull/373/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/373">#373</a>, maybe we should solve this issue. Below is the trace to the leak in <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="415537103" data-permission-text="Issue title is private" data-url="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/373" data-hovercard-type="pull_request" data-hovercard-url="/OpenSmalltalk/opensmalltalk-vm/pull/373/hovercard" href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/373">#373</a>, <code>ioProcessEvents</code> seems like an appropriate place for the autoreleasepool. How can we find other places that enter Objective-C and need a pool?</p>
<pre><code>Direct leak of 219512 byte(s) in 1193 object(s) allocated from:
    #0 0x10bb1fffc in __sanitizer_mz_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x5dffc)
    #1 0x7fffdd224281 in malloc_zone_malloc (libsystem_malloc.dylib:x86_64+0x2281)
    #2 0x7fffc6de33d5 in AllocateAndInitializeEvent(__CFAllocator const*) (HIToolbox:x86_64+0x33d5)
    #3 0x7fffc6e3fc4d in CopyEventInternal(__CFAllocator const*, OpaqueEventRef*) (HIToolbox:x86_64+0x5fc4d)
    #4 0x7fffc6e49228 in CopyEventAs (HIToolbox:x86_64+0x69228)
    #5 0x7fffc6e1d349 in CreateEventWithCGEvent (HIToolbox:x86_64+0x3d349)
    #6 0x7fffc6e1b0e2 in CreateAndPostEventWithCGEvent(__CGEvent*, unsigned int, unsigned char, __CFMachPortBoost*) (HIToolbox:x86_64+0x3b0e2)
    #7 0x7fffc6e275cd in Convert1CGEvent(unsigned char) (HIToolbox:x86_64+0x475cd)
    #8 0x7fffc6e2745e in MainLoopObserver(unsigned int, OpaqueEventRef*, void*) (HIToolbox:x86_64+0x4745e)
    #9 0x7fffc6de8368 in _NotifyEventLoopObservers (HIToolbox:x86_64+0x8368)
    #10 0x7fffc6e10ea5 in RunCurrentEventLoopInMode (HIToolbox:x86_64+0x30ea5)
    #11 0x7fffc6e10bf8 in ReceiveNextEventCommon (HIToolbox:x86_64+0x30bf8)
    #12 0x7fffc6e10b25 in _BlockUntilNextEventMatchingListInModeWithFilter (HIToolbox:x86_64+0x30b25)
    #13 0x7fffc53a5a53 in _DPSNextEvent (AppKit:x86_64+0x46a53)
    #14 0x7fffc5b217ed in -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (AppKit:x86_64+0x7c27ed)
    #15 0x10b7ce07c in -[sqSqueakOSXApplication(events) pumpRunLoopEventSendAndSignal:] sqSqueakOSXApplication+events.m:78
    #16 0x10b7ce7d9 in -[sqSqueakOSXApplication(events) pumpRunLoop] sqSqueakOSXApplication+events.m:105
    #17 0x10b7e4898 in vmIOProcessEvents sqSqueakEventsAPI.m:80
    #18 0x10b7e49c7 in ioProcessEvents sqSqueakEventsAPI.m:103
    #19 0x10b5b5653 in checkForEventsMayContextSwitch gcc3x-cointerp.c:62680
    #20 0x10b5c17ed in ceCheckForInterrupts gcc3x-cointerp.c:15188
    #21 0x119a75794  (<unknown module>)
    #22 0x10b566712 in interpret gcc3x-cointerp.c:2754
    #23 0x10b7ebada in -[sqSqueakMainApplication runSqueak] sqSqueakMainApplication.m:201
    #24 0x7fffc93786fc in __NSFirePerformWithOrder (Foundation:x86_64+0xd76fc)
    #25 0x7fffc78cfc56 in __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ (CoreFoundation:x86_64h+0xa6c56)
    #26 0x7fffc78cfbc6 in __CFRunLoopDoObservers (CoreFoundation:x86_64h+0xa6bc6)
    #27 0x7fffc78b05f8 in __CFRunLoopRun (CoreFoundation:x86_64h+0x875f8)
    #28 0x7fffc78b0033 in CFRunLoopRunSpecific (CoreFoundation:x86_64h+0x87033)
    #29 0x7fffc6e10ebb in RunCurrentEventLoopInMode (HIToolbox:x86_64+0x30ebb)
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>You are receiving this because you are subscribed to this thread.<br>Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/374#issuecomment-468940443">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW11A8LBgYYh3ih-GCmljcS1jPuzWks5vSrLcgaJpZM4bXsAc">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW21dnkDXg8Midfu-euTRgH97CqjDks5vSrLcgaJpZM4bXsAc.gif" height="1" width="1" alt=""></p>

</blockquote><div><br></div><div><br></div>