socket.IO-objc icon indicating copy to clipboard operation
socket.IO-objc copied to clipboard

EXC_BAD_ACCESS when creating timer in setTimeout.

Open antonholmquist opened this issue 11 years ago • 1 comments

screen shot 2013-06-12 at 2 57 21 pm

antonholmquist avatar Jun 12 '13 12:06 antonholmquist

I figured this issue could happen under these circumstances:

1 The _timeout timer is currently running and retaining the SocketIO-object. 2. The owner of the SocketIO-object no longer needs it and releases it. 3. The timer is now the sole owner of the SocketIO-object, and when it is invalidated on line 372, the SocketIO-object is deallocated, and hence, referencing the _timeout variable results in a bad access.

antonholmquist avatar Jun 12 '13 13:06 antonholmquist