|
|
On 3/16/23 20:23 Rob McDonald wrote:
On Thursday, March 16, 2023 at 10:53:01 AM UTC-7
Albrecht Schlosser wrote:
My proposed changes: since I'm not sure that we are using
the same version of the Cartesian project, following is the
full code of the two mentioned d'tors with fixes.
This fix works for me.
It took a while for me to figure out what he was doing --
it feels much more complex than a singly linked list should
be. It took even longer to convince myself that the fix is
right.
Yes, I also had a hard time to find this out. I added a lot of debug
statements in destructors to see when the first occurrence of the
double free happened exactly. ASAN was a big help, but finally you
need to understand what he was doing. I was surprised that he didn't
include pointers in the objects but used the linked list
As you say -- it is hard to understand why the FLTK change
would trigger this.
Yes, I have no idea, but I won't bother finding it out.
I also removed everything to do with previous -- it looks
like a remnant of a doubly linked list, but it isn't used now.
Hmm, I'm not sure. In my version class 'Ca_ObjectChain' has only a
'next' and an 'object' pointer. The (local) variable 'previous' is
AFAICT needed to close the linked list whenever you remove an entry
from the middle of the list.
But maybe you meant something else...
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/5a64e85a-6abf-a3de-035a-5e54c4309d3a%40online.de.
[ Direct Link to Message ] | |
|
| |