Created
March 20, 2013 04:36
-
-
Save mike3k/5202342 to your computer and use it in GitHub Desktop.
Most frightening piece of code I've ever seen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void) | |
dealloc | |
{ | |
// because of TiledLayer ( which draws in a separate threads) and propbably a bug in iOS dealloc is called twice. | |
// make sure it will execute once in our class | |
if ( _deallocCalled ) | |
return; | |
_deallocCalled = YES; | |
#if XXXXXX | |
usleep(50000); | |
#endif | |
[self disableDrawing]; | |
CGPDFDocumentRelease(pdf); | |
pdf = NULL; | |
[_lockPdfDrawers lock]; | |
[_lockPdfDrawers unlock]; | |
[_lockPdfDrawers release]; | |
_lockPdfDrawers = nil; | |
#if XXXXXX | |
usleep(200000); //wait 200 milliseconds | |
#endif | |
[super dealloc]; | |
} |
soffes
commented
Jun 10, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment