[vlc-devel] [vlc-commits] commit: qt4: Don't create QMenu without parents (Erwan Tulou )

Jakob Leben jakob.leben at gmail.com
Tue Apr 6 20:04:25 CEST 2010

On Tue, Apr 6, 2010 at 5:51 PM, brezhoneg1 <brezhoneg1 at yahoo.fr> wrote:

> The thing is there are not many solutions
>  - QMenu needs a QWidget as parent
>  - dialog_provider (as a dialog provider only) doesn't have any widget
>  - Leaving QMenu without parent is just plain memory leak, and leads to vlc
> objects leak at times.
I agree that creating QObjects without parents is not the best practice and
somewhat risky. I think though, that those popup menus are reasonable
exception, if we can ensure that they get deleted when necessary.
p_intf->p_sys->p_popup_menu pointer is the device to make that possible and
prevent "plain" memory leaks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100406/417f2d3c/attachment.html>

More information about the vlc-devel mailing list