Return to Home
  View the contents of your Cart View cart  
  0 item(s) in cart  
  Checkout  

Gimpel Software - Discussion Forum
Discussion Forum
We invite you to use this forum to communicate with other PC-lint and FlexeLint users. You do not need to log in to post a message. WARNING: Your email address will not be encrypted. We recommend that you obfuscate it as protection from web crawlers. To receive technical support directly from Gimpel Software, please follow the guidelines at http://www.gimpel.com/html/support.htm
Reply Form
Original Message:
Hi Wlad, 

D'oh!  I must admit that I only glanced at the
manual this time. 

You are absolutely correct; Lint should be able to
see that the constructor takes custody of "this"
with the option you had originally.  It's an
interesting situation though, because in the case of: 

Obj* child = new Obj( &pa ); 

...Lint needs to be aware that a function (the
constructor) will take custody of an object that
has not yet been created. 

It seems there is a work-around though -- assuming
that, in your actual production code, you intend
to call some member function of Obj (with the
"child" pointer) within the function where that
object is created, e.g.: 

child->Print(); // Obj::Print must be called in
the same scope as "new Obj" for this to work. 

If that's the case, then you can just do: 
//lint -sem(Obj::Print, custodial(t))

...which should work. 

In any event, we do plan to support your first
custodial semantic in a future version of Lint. 

Thanks for the feedback!
Subject:
Name:
Email:
Message:
Email To Author   
Please type the four digit number on the right: