[cfe-dev] Weird Clang/LLVM behavior
Mohit Sharma
mohit at mohitsharma0690.com
Mon Mar 24 02:58:31 PDT 2014
Hey guys,
I'm looking at a weird thing going in my project. Wanted to know if you
guys know about this or if it's a bug. I've some code like this
dispatch_async(dispatch_get_global_queue(Default, 0), ^{
for (int i = 0; i < 100000; i++) { // a big loop
[a.b doSomethingWithI:i];
}
});
The object "a" uses "forwardInvocation:" to get the property "b" and
returns it. Now when I run this I see a huge number of NSInvocation objects
being created for the forwardInvocation: never freeing the memory they used
although the block is done executing.
Also this only happens when I run it in Debug build. Moreover this never
happens on the main queue. Seems like a bug to me but I might be wrong. Any
ideas on what's going on?
Thanks
Mohit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140324/ed33d8b1/attachment.html>
More information about the cfe-dev
mailing list