Peter Kümmel wrote:
Abdelrazak Younes wrote:
Peter Kümmel wrote:
Yes, this could be. We should simply NOT use the static solution.
Does attached patch work on Debian? If yes we could remove
BugfixSignal, and
create the signal at runtime. But we then have to clean up correctly.
Your solution will only work with the first instance...
Abdel.
I don't understand. The only problem I see is the memory leak because of not
deleting hideSignal.
The hideSignal must not be shared between multiple Dialogs instance (as
will be the case with multiple views). But this is what will happen hen
you do this:
Dialogs::Dialogs(LyXView & lyxview)
: lyxview_(lyxview), in_show_(false)
{
+ if (!hideSignal) {
+ hideSignal = new BugfixSignal<boost::signal<void(string const &,
Inset*)> >;
+ }
Clearer?
Abdel.