Simple locking/memory management question
Simple locking/memory management question
- Subject: Simple locking/memory management question
- From: Edward Deards <email@hidden>
- Date: Thu, 21 Apr 2005 11:09:16 +1000
Thanks for previous responses all. This is a good list to read during
dull moments.
I've a simple question regarding locking. As I'm an ObjC and Cocoa
newbie, coming from a far longer Java history, some elements of memory
management are new to me (surprise surprise).
In a threaded environment, I've a thread that will never finish. Its
simply looping and blocking forever on a socket accepting connections.
In the class that detached this thread and has the target selector of
the thread, when it is dealloc'ed, can I use locking safely within
dealloc to try and make this thread halt gracefully?
Now I write it down I'm not even certain that locking has anything to
do with it. Till now I'e dismissed this all as not being too important,
since the only time the parent class is dealloced is when the app is
shutting down. However I'd hate to leave an underlying bsd socket
sitting there bound to the server port.
I hope I've been clear. :-/ Thoughts?
Cheers
----
Edward A. Deards
+61 419 354 948 (M)
+61 363 232 678 (W)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden