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

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
Reply Form
Original Message:
With QT, the QObject object can take an (optional)
pointer that then takes ownership of the pointer,
so that when that 'parent' object is deleted, it
will delete the child QObject. Using this
construct is the same as calling setParent on the
child object with parent pointer. In other words,
the two following code bits are the same:

QObject* myObject1 = new QObject(parentPointer);

QObject* myObject2 = new QObject(NULL);

It is obviously possible to use
"-sem(QObject::setParent,custodial(t))" to handle
the second case, but it would be useful to also be
able to do it (somehow) for the first. What, if
any, lint parm or option would I need to use in
order to handle the first case (that is, the
pointer passed as parm #X in the constructor of a
class implies ownership of the 'this' pointer is
given to that other pointer object)?

Email To Author   
Please type the four digit number on the right: