Re: Interface Question
- From: Hans-Peter Diettrich <DrDiettrich1@xxxxxxx>
- Date: Tue, 10 Oct 2006 11:48:15 +0200
Rob Kennedy wrote:
But note that you can't *fully* disable reference counting. You can change _Release to not destroy the object, but you can't tell the compiler not to call _AddRef and _Release at all.
Correct.
So if you free the object by calling Free, you need to be certain that there are no dangling interface references for that object. If there are, then _AddRef or _Release will eventually be called for the object that has already been destroyed, and that's the same problem you have even if you _don't_ "disable" reference counting.
Just _AddRef and _Release cannot cause problems, because the non-counting versions don't access the object. Calling other methods may cause trouble, of course.
DoDi
.
- Follow-Ups:
- Re: Interface Question
- From: Rob Kennedy
- Re: Interface Question
- From: Bjørge
- Re: Interface Question
- References:
- Interface Question
- From: alanglloyd@xxxxxxx
- Re: Interface Question
- From: Maarten Wiltink
- Re: Interface Question
- From: Hans-Peter Diettrich
- Re: Interface Question
- From: Maarten Wiltink
- Re: Interface Question
- From: Hans-Peter Diettrich
- Re: Interface Question
- From: Rob Kennedy
- Interface Question
- Prev by Date: Re: Disabling an application during a file save?
- Next by Date: Re: Interface Question
- Previous by thread: Re: Interface Question
- Next by thread: Re: Interface Question
- Index(es):
Relevant Pages
|