winhelp: wRefCount

Eric Pouech eric.pouech at
Sun Nov 19 11:59:45 CST 2006

Kirill K. Smirnov a écrit :
> В сообщении от 19 ноября 2006 19:23 вы написали:
>> actually we should decrement the count for:
>> - closing the window attached to a page
>> - upon exit, remove references in history (and attached refcounts)
>> that should help here (not sure I got them all though)
> To be honest, I do not understand "cleary and distinctly" what wRefCount 
> represents.
> Now, I consider wRefCount as amount of history entries (referring to the file) 
> in all histories. But what to do with popup windows? They are not in any 
> history. Also, there are help files used ONLY in popup windows (e.g. 
> wdtip8.hlp in MS Office 97).
> This is another problem to meditate upon.
> -- Kirill K. Smirnov
it should represent the number of times this help file is referenced by 
other objects
this includes:
- opened windows
- history
basically, as soon as someone stores a pointer to an help file it should 
bump the refcount ; and each time the slot is erased/replaced, the 
refcount should be decremented

I'm not saying this is perfectly done yet, but this is likely the best 
way of knowing when an object shall be destroyed

 From looking at the code, it didn't see any big issues with the 
increment of helpfiles whereas we're missing a couple of decrement in 
lots of places

More information about the wine-devel mailing list