On Oct 21, 2013, at 7:57 PM, Maxthon Chan <[email protected]> wrote:

> What about the “database” object? Is that yours? If so, can you 
> retain/autorelease it (using runtime functions documented by LLVM) when 
> purging?

Let me copy and paste what I said before: "I’m not in control of the cache 
purge — it seems to be triggered as part of the app going into the background."

If you want to see the backtrace, it’s here (I tried to link to it before but 
the listserv stripped the HTML link):
        https://github.com/couchbase/couchbase-lite-ios/issues/164

The purge happens like so:
    frame #25: 0x39445730 libcache.dylib`cache_remove_with_block + 132
    frame #26: 0x2e7e6834 
CoreFoundation`__CFNotificationCenterAddObserver_block_invoke + 124
    frame #27: 0x2e870120 
CoreFoundation`__CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
    frame #28: 0x2e7e4316 CoreFoundation`_CFXNotificationPost + 1718
    frame #29: 0x2f1c8dcc Foundation`-[NSNotificationCenter 
postNotificationName:object:userInfo:] + 76
    frame #30: 0x310a3040 UIKit`-[UIApplication 
_handleApplicationSuspend:eventInfo:] + 908
    …

That is, it looks like NSCache has registered itself for the 
going-into-the-background notification. I have no control over this. There is 
no way I can call anything before/after the purge. I cannot retain anything 
while purging.

—Jens
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to