|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Ben Callister (BCallister_at_TUTOR.COM)
Date: Wed Aug 21 2002 - 11:22:03 CDT
hello, again.
suppose i do the following...
1) i create a new thread, entering a new STA (via CoInitialize(STA))
2) this new thread creates an STA-marked object
3) this new thread marshalls the new object's interface to ANOTHER
thread (this OTHER thread then AddRefs the object)
4) i place the new thread (created in #2) in a GetMessage() loop -
thereby fulfilling the STA requirement for dispatching messages on the
pump
now the question: do i personally have to manage the lifetime of that
new thread or will COM manage it for me when the refcount of the object
that was created in its apartment goes to zero??? it would totally suck
if i have to manage it personally because i really dont need that thread
anymore from my perspective - it was just used to get the new object in
its OWN STA, rather than the clients.
thanks for the help,
Benjamin Callister
Vice President of Engineering, Tutor.com
Real Tutors, Real Results.
e: bcallister
tutor.com
p: 212.528.3101; x.227
w: http://www.tutor.com
----------------------------------------------------------------
Users Guide http://discuss.microsoft.com/archives/mailfaq.asp
contains important info. Save time, search the archives at
http://discuss.microsoft.com/archives/index.html .
To unsubscribe, mailto:DCOM-signoff-request
DISCUSS.MICROSOFT.COM
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]