Guest
|
Posted: Fri Apr 27, 2007 9:55 pm Post subject: Paradox |
|
|
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 |
|