[Interest] Interest Digest, Vol 12, Issue 40

Till Oliver Knoll till.oliver.knoll at gmail.com
Fri Sep 14 18:50:04 CEST 2012


Am 14.09.2012 um 17:29 schrieb Rayner <rpgomez at uci.cu>:

> If you want to keep file as a non member pointer in your ctor, then you must 
> set a parent to avoid memory leaks:

Likewise, if you want to reply to a certain topic, you should make sure to set "a valid email parent" to you reply, as to avoid information leaks ;)

In other words: DON'T reply to Digest messages - it's mostly useless! People can only *guess* to what you're actually referring to (especially if you omit any quotation!).

If you want to actively take part in discussions, you need to subscribe such that you receive all the individual messages (I think), not just one single "Interest Digest".

Cheers,
  Oliver

P.S. Your advice was correct, however. Depending on what the lifecycle of the parent is - and how often the code instantiating QFile is called - one still might want to do an explicit 'delete' on the instance. Otherwise you keep on accumulating instances of QFile with a valid parent (so no memory leak), but all those instances might e.g. be only deleted at application end (e.g. in case the parent was a QMainWindow!).


More information about the Interest mailing list