Great, I almost forget it. Thank you very much.

Sent from  myMail for iOS

2014年1月11日 星期六 21:28 +0800 from 程梁  <[email protected]>:
I can't agree Oliver anymore. I believe some code seems OK does not means you 
should write in that way (just think about business flow control using 
exception, it's OK, but you should not do so). Now I knew it's OK but I'll 
still tell my blog readers it does not recommand to do so. :-)

Thank you all!

Cheng Liang
Nanjing, China
http://www.devbean.net

----------------------------------------------------------------------
From: [email protected]
Date: Sat, 11 Jan 2014 13:49:17 +0100
To: [email protected]
Subject: Re: [Interest] Create the main widget on heap in main()

Am 11.01.2014 um 13:30 schrieb Etienne Sandré-Chardonnal < 
[email protected] >:

>2014/1/11 Constantin Makshin  < [email protected] >
>>True, but why would one need a parented object in main()? :-)
>
>True, but an object that should be deleted at the last line of main but is not 
>by mistake is a non-leak :)

Technically it is. 
>The process heap is deleted anyway...

The OS is just kind enough to sweep it under the rug. It won't make it easier 
to find "real" leaks with tools, because your developers will tend to say the 
same: "It's not a leak, it's cleared by the OS anyway..."

>I've seen already several crashes due to QObjects on stack and double 
>deletions, I just want to point this out...

Fix the double-deletes instead - those are real issues! If an object is 
double-deleted it might be an indication that it should not have been allocated 
on the stack in the first place... 

Cheers,
  Oliver
_______________________________________________
Interest mailing list
[email protected] http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to