 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Michael Vinther Guest
|
Posted: Sat Feb 11, 2006 3:03 pm Post subject: FastMM4 / FullDebugMode and COM objects |
|
|
We are using Delphi's XML interface (XMLDoc / XMLIntf) which is based on COM
objects. When using the FullDebugMode of FastMM4 it sometimes reports that a
memory block has been modified after being freed and it always happens with
memory blocks that have been occupied by one of the XML objects.
As far as I know Delphi uses some kind of simple garbage collection for
these objects. Could it be related to that?
Has anybody else had problems with COM objects and FullDebugMode?
/Michael |
|
| Back to top |
|
 |
Pierre le Riche Guest
|
Posted: Sat Feb 11, 2006 11:03 pm Post subject: Re: FastMM4 / FullDebugMode and COM objects |
|
|
Hi Michael,
I have also had problems with the XML components. The last issue I can
recall is that if you reference a node and subsequently clear the document
(all in one procedure), then the cleanup code at the end of the procedure
overwrites memory. (It seems the node object dies with the document, even
though there may still be a reference to it). The workaround was to
explicitly set all node references no "nil" before clearing the document. I
also had to change my code a bit to avoid any auto-generated (and thus
invisible) interface variables, which I otherwise would not be able to set
to nil.
The general rule of thumb is to not mix the use of object and interface
references to the same COM object wrapper, otherwise it is easy to run into
trouble.
Regards,
Pierre |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|