I'm not sure how to translate 'leak' correctly in your complete post. I assume, you mean the "unfreed memory" which is reported by Heaptrc? From all what I know, there are no more leaks.
Yes: "leak" = "unfreed mem"
Strange
$004AD435 UTF16TOUTF8, line 3971 of lazutf8.pas
$005F7476 GETCONTROLTEXT, line 1084 of win32proc.pp
This is clearly a string (ansistring) that is allocated by Utf16ToUtf8. (I don't think anything inside Utf16ToUtf8 leaks, that would have been reported by lots of people already).
But ansistring don't normally leak on their own. That is extremely hard to get to happen.
Well, ok, you can do...
pointer(myansistring) := nil;
Or you compiled with "implicitExceptions OFF", and had an exception that prevented the string from being released (normally exceptions don't prevent that)
But then, that would mean, that at some point something gets that caption, assign it to some variable that is either cleared by typecast, fillchar, or freemem (if the var is a field in some hand allocated mem)....
Otherwise, Ansistring are refcounted.
- global/local var will be released automatically
- fields in object too, if the object is freed (and if it isn't then it would need to show as leak of its own)
But yes
"1" should have spotted that.
Looking at
Would the caption of that window be short enough to fit?
Actually, that would mean 4 or less chars. (Since the string header takes the rest of the memory).
And the "26" bytes on Linux match that "max 4 char", since your Linux trace seems 64bit, and the Windows seems 32bit (diff size for string header)
As I wrote I did this already, but the result contained nothing what helped me: only a couple of nearly the same "Conditional jump or move depends on uninitialised value(s)" for SYSTEM_$$_INDEXBYTE$formal$INT64$BYTE$$INT64, where I don't see something wrong.
Sorry, I didn't spot the "done valgrind".
When you did, did you check "Compile for valgrind -gv"?
If you did not, then valgrind will not detect the leaks (and strangely in your case it has not even detected the one known leak).
When you check that, then you must uncheck the "heaptrc" checkbox.