BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

FastMM4 / FullDebugMode and COM objects

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM
View previous topic :: View next topic  
Author Message
Michael Vinther
Guest





PostPosted: Sat Feb 11, 2006 3:03 pm    Post subject: FastMM4 / FullDebugMode and COM objects Reply with quote



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





PostPosted: Sat Feb 11, 2006 11:03 pm    Post subject: Re: FastMM4 / FullDebugMode and COM objects Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.