On Sun, 8 Aug 2021 14:29:13 +0200
Ichthyostega <[email protected]> wrote:
>Am 08.08.21 um 12:55 schrieb Will Godfrey:
>> so I'll do some torture testing on it in a side branch, ....
>
>One small fixup please. In the light of the discussion about
>adding things to some other UI container and then disposing them:
>
>void MasterUI::fillfiler(string type_name) {
> //
>
>...
>...
> file::dir2string(tofetch, filerpath, filerext, options);
> filerlist.clear();
> filerscroll->clear();
>
>
>Shouldn't then the last two lines be better swapped? I.e shouldn't
>we better call the clear() on the scroller first, which supposedly
>detaches all child elements? As it stands now, the filerlist.clear()
>has already deleted those objects, and the filerscroll->clear() might
>still touch those zombie objects.
>
That's what I thought when I wrote the vector based code, but like that, a
second attempt to open the filer segfaulted. This is why I was concerned that
there's some interaction I didn't understand.
--
Will J Godfrey
https://willgodfrey.bandcamp.com/
http://yoshimi.github.io
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
_______________________________________________
Yoshimi-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yoshimi-devel