On 2013-06-13 13:04, Dmitriy Igrishin wrote:
>
> While it's possible, it seems to me, that this coding technique is just
> asking for troubles. Wt has a pointer semantics and heavily oriented to
> the abstract classes design. There are a lot of allocations under the hood
> of Wt, so I don't believe in a benefit of stack-allocated objects (except of
> WDialog and similar instances in case of blocking the thread awaitng for the
> user response).
>


Well, it saves typing :-). More seriously though, I prefer to going 
trough some trouble now and ending up with a full understanding over not 
worrying and hoping for the best.


>
> Yes, because WMenuItem is owns contents. WMenuItem needs to be
> an owner of contents while the content's ownership may be transferred to
> the contents stack after the actual loading.
> On the other hand, the content that was not reowned must be deleted
> by the WMenuItem.

The issue was solved by making the content widgets heap allocated and 
marking their ownership as transferred.

Cheers,

Rutger




------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to