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 

Paradox

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Fri Apr 27, 2007 9:55 pm    Post subject: Paradox Reply with quote



I use Bordland C++ Builder 6.0 Build 10.166

I create application with Button and ClientSocket. On Button click I
set following:

TClientSocket *temp = ClientSocket1;
FILE *log=fopen("c:\\log.txt","a");
fprintf(log,"1: %p %p\n",temp,ClientSocket1);
ClientSocket1 = new TClientSocket(temp->Owner);
fprintf(log,"2: %p %p\n",temp,ClientSocket1);
ClientSocket1->Active = false;
ClientSocket1->ClientType = temp->ClientType;
ClientSocket1->Address = temp->Address;
ClientSocket1->Port = temp->Port;
fprintf(log,"3: %p %p\n",temp,ClientSocket1);
delete temp;
fprintf(log,"4: %p %p\n",temp,ClientSocket1);
fclose(log);

this is only one function in my program.

And this is file log.txt:
1: 00BC6E30 00BC6E30
2: 00BC6E30 00BC723C
3: 00BC6E30 00BC723C
4: 00BC6E30 00000000

May somebody say me, why after object temp deleting I have real
address temp and null address ClientSocket1?

Sincerely,
Busya
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder 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.