[fpc-pascal] How are Assigned, Free, Nil and Destroy related?
    Ludo Brands 
    ludo.brands at free.fr
       
    Sat Oct 22 09:33:25 CEST 2011
    
    
  
When the loop runs again Assigned in InitVars is false so as soon as those
FBreakStrings and SCStrings are accessed within the loop a SIGSEGV occurs.
So what I want to know is whether Assigned  remains true when Free is
executed.
 
See my previous answer. 
 
There is a helper function "procedure FreeAndNil(var obj);" that calls
obj.free and sets obj to nil. So instead of SCStrings.Free; SCStrings:=nil;
call FreeAndNil(SCStrings);
Ludo
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111022/1098e642/attachment.html>
    
    
More information about the fpc-pascal
mailing list