<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br><div> > - Here example for function inside a class of myunit:<br>> > <br>> > library mylib ;<br>> > <br>> > uses<br>> > myunit;<br>> > <br>> > function mylibclassfunction() : integer; cdecl;<br>> > var<br>> > myclass : TMyUnitClass; /// class defined in myunit (if can be a<br>> > variable outside the function)<br>> > <br>> > begin<br>> > result := -1 ;<br>> > myclass := TMyUnitClass.Create; <br>> > result := myclass.myunitclassfunction() ; // a function of<br>> > myclass <br>> > end;<br>> > <br>> > exports <br>> > mylibclassfunction ;<br>> > <br>> > begin<br>> > end.<br>> > <br>> <br>> Now what I would like in the compiler is a warning: potential memory<br>> leak at myclass := TMyUnitClass.Create;<br>> <br>> ;)<br><br><br>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...<br><br>Thanks.<br><br></div> </div></body>
</html>