[OLE #29] Stub Manager Lifecycle Change
rob at codeweavers.com
Mon Jan 10 13:15:52 CST 2005
After having a private discussion about the stub manager lifecycle, Mike
and I agreed that the stub manager has to control the life of the
ifstubs, so that the ifstubs are destroyed when the controlling stub
manager is destroyed. We thought about making the ifstubs control the
lifetime of the stub manager, but the locking was insane so we quickly
dropped the idea. It was necessary to make the stub manager ref counted
because otherwise if it was freed while another thread was using the
stub manager (say, after calling get_stub_manager) then it would crash
- Document how thread-safety is ensured for each member of the
stub_manager and ifstub structs.
- Make stub_manager ref counted to ensure it doesn't get freed whilst it
is still being used.
- ifstubs are now freed only when the controlling stub_manager is freed.
- Rename stub_manager_ref/unref to stub_manager_ext_addref/release
respectively and make then take an unsigned long to prevent malicious
callers from passing in a negative value and corrupting the ref count.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 16695 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20050110/1591975e/ole29.bin
More information about the wine-patches