[fpc-pascal] fp universal library ?

Fred van Stappen fiens at hotmail.com
Tue Feb 4 22:40:53 CET 2014


 > - 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;
> 
> ;)


Yep, before to get that sympathetic message, i changed the code, now all the class.create are done inside the unit used by the library and i do not get the message...

Thanks.

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20140204/3fff8246/attachment.html>


More information about the fpc-pascal mailing list