Preemptive Threads and Listboxes Don't Play Nice

Actually consider this.

Say you have a URLConnection. You have sent a command to a remote server. The server delays sending the connection for a short bit but then sends the data back. In the mean time you have set the URLConnection to NIL and your WeakAddressOf delegate has now been destroyed. However, the OS framework is in the process of sending the data to your URLConnection object but the delegate method is now NIL and BOOM! Crash goes your app.

See this thread I started back in 2015:

1 Like