CubicDesign wrote:
> I just wanted to create a piece of code that is supposed to crash (AV) 
> the program.
> 
> And
> 
> var t: tobject;
> begin
>   t.free;
> end;
> 
> should do that. Right?

What makes you think that?

Local (stack) variables are not automatically initialized, so the value 
of t is random until you assign something to it. That means sometimes it 
will have a value that causes an access violation and sometimes it will not.

Try assigning it the value nil. Then you be assured to cause a problem.
_______________________________________________
Delphi mailing list -> Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to