[fpc-pascal] fp universal library ?

Christo christo.crause at gmail.com
Tue Feb 4 18:09:28 CET 2014


On Sun, 2014-02-02 at 23:13 +0100, Fred van Stappen wrote:

> - Here example for function inside a class of myunit:
> 
> library mylib ;
> 
> uses
> myunit;
> 
> function mylibclassfunction() : integer; cdecl;
> var
> myclass : TMyUnitClass; /// class defined in myunit (if can be a
> variable outside the function)
> 
> begin
>    result := -1 ;
>    myclass := TMyUnitClass.Create;  
>    result := myclass.myunitclassfunction() ; // a function of
> myclass  
> end;
> 
> exports  
> mylibclassfunction ;
>  
> begin
> end.
> 

Now what I would like in the compiler is a warning: potential memory
leak at myclass := TMyUnitClass.Create;

;)




More information about the fpc-pascal mailing list