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:
Bumping this again.
Has any progress been made on allowing
constructors to take custodial ownership of memory?

Code such as the following results in a 429 :
Custodial pointer 'entPtr' (line 218) has not
    been freed or returned

EntryPtr clone(const std::string& newType) {
  Entry* entPtr = 0;
  entPtr = new Entry(newType);
  EntryPtr result(entPtr);
  return result;
}

Trying a twist on James's earlier suggestion, I
though maybe Lint could be tricked into letting
the destructor take ownership, since no other
methods are called, but that didn't work:

-sem(EntryPtr::EntryPtr,custodial(1))
-sem(EntryPtr::EntryPtr,custodial(t))
-sem(EntryPtr::~EntryPtr,custodial(1))
-sem(EntryPtr::~EntryPtr,custodial(t))

There doesn't seem to be any way yet as of 9.00K
to allow this to be indicated to PC Lint.
Subject:
Name:
Email:
Message:
Please type the four digit number on the right: