I just found out that an NSAssert in a block somewhere in my application was causing a retain cycle. I was like, "huh?", so I checked out the definition of NSAssert, and sure enough, it references 'self':
Anyway, I start searching through the application codebase, and, having included the source of PocketSocket directly in the project, I happened upon an NSAssert within a block within PSWebSocketServer around line 518. I thought you might want to know. Theoretically, it could be causing you to have to release PSWebSocketServer one too many times in order to get apparent proper dealloc behavior.
However, just a heads up, I have not confirmed that this is indeed happening or causing problems in PocketSocket.
@paulshapiro I'm not sure this is actually causing a retain cycle, because while the block does strongly hold onto "self" because of the assert the block is not retained by self once it finishes execution.
Hello there,
First, thanks for the fantastic library.
I just found out that an NSAssert in a block somewhere in my application was causing a retain cycle. I was like, "huh?", so I checked out the definition of NSAssert, and sure enough, it references 'self':
Anyway, I start searching through the application codebase, and, having included the source of PocketSocket directly in the project, I happened upon an NSAssert within a block within PSWebSocketServer around line 518. I thought you might want to know. Theoretically, it could be causing you to have to release PSWebSocketServer one too many times in order to get apparent proper dealloc behavior.
However, just a heads up, I have not confirmed that this is indeed happening or causing problems in PocketSocket.
Thanks, Paul