DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2053
Version: 1.3-feature


Confirmed on Ubuntu 8.04:

1) Applied v3 patch manually to svn current and created new patch (v4).

2) Re-checked out 1.3.x (r7168) clean copy

3) Downloaded OP's test program, compiled and ran and it behaved
   as described before patch is applied; first window shows
   "xclass_test" and all others show "(null)". 

4) Applied v4 patch, rebuilt with no errors.

5) Rebuilt OP's test program, now behaves as described when
   patch is applied; all windows created show "xclass_test".

I don't see anything wrong with the code offhand; it makes a strdup()
that is never free()ed, but this is intentional to ensure the saved
string lasts the lifetime of the program.

One could argue it should be free()ed before Fl::run() returns,
though I believe plenty of strings remain allocated as normal
behavior already, and as most of us know, exit() absolves all sins
of forgotten free()'s, so should be fine.

I'd suggest the static variable definition include a comment describing
the intention of this, as it is not immediately obvious without
the context of this STR. At very least, comment could refer to STR#2053
for details. (Such a comment was NOT added to the v4 patch)


Link: http://www.fltk.org/str.php?L2053
Version: 1.3-feature

_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev

Reply via email to