New warning (or at least I only noticed it now)
Pavel Sanda
sanda at lyx.org
Mon Nov 21 13:07:57 UTC 2022
On Mon, Nov 21, 2022 at 12:00:59PM +0100, Jean-Marc Lasgouttes wrote:
> Le 21/11/2022 ?? 11:17, Pavel Sanda a écrit :
> >On Mon, Nov 21, 2022 at 10:09:15AM +0100, Jean-Marc Lasgouttes wrote:
> >>I cannot really understand what the destroyed temporary is.
> >
> >Don't we create and return temp at GuiApplication.cpp:3695 ?
> >If you look above at theFontLoader (GuiApplication.cpp 3689)
> >we do similar logic but we reserve font_loader_ for the construct.
>
> If it was in GuiApplication, the warning will be there, wouldn't it?
I don't think so, because binding a const reference to a temporary can
extend the lifetime of the temporary in certain contexts, so unless you
look from outside you have no way to tell.
> And it seems to me that addresses are consistently returned, which point to
> an array cell (which s not going away).
Maybe, I haven't study the code carefully. Can look again in the evening.
Pavel
More information about the lyx-devel
mailing list