Delphi
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Delphi

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old May 9th, 2008, 07:31 AM
mikcaau
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
edit1.create

When I have posted that the following lines:

:= Nil;
Free();

This will cause an exception
try
Free;
:= nil;
except
on E:Exception do;
end;

will not!
you set := nil you cannot reach it

Mick

Reply With Quote
  #2  
Old May 9th, 2008, 09:32 AM
Rob Kennedy
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
edit1.create

mikcaau wrote:
>When I have posted that the following lines:
>>

>:= Nil;
>Free();
>

This will cause an exception

No it won't. What exception do you think it will raise?

try
Free;
:= nil;
except
on E:Exception do;
end;

will not!
you set := nil you cannot reach it

But you can still call non-virtual methods on that variable, and Free in
particular won't do anything if it detects that it has been called on a
null reference.

--
Rob

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Delphi > edit1.create


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT