Objective-LevelDB icon indicating copy to clipboard operation
Objective-LevelDB copied to clipboard

LevelDB instance gets overreleased under high contention

Open dsanghan opened this issue 7 years ago • 1 comments

As someone else already mentioned in one of the other issues, LevelDB.mm seems to be missing some retains. I was getting unexplainable crashes for about 0.3% of my users and it turns out that the db ivar in LevelDB.mm is getting released even though a strong reference to its parent , and in turn itself exists when used across a multitude of threads with a very high volume of reads. Ironically, the issue gets worse when writes are synced on the wrapper.

The issue does get resolved when I move the three .mm files to ARC - which I thought would be easier to do than further debug the overrelease. Maybe the .mm files should just be moved to arc for good?

dsanghan avatar Aug 03 '16 18:08 dsanghan

@dsanghan can you share how you fixed your issue by moving them to ARC? Opening a pull request maybe?

matehat avatar Dec 12 '18 15:12 matehat