unormal, 27 days ago ITS FUCKING STRINGBUILDERS running this code over and over again explodes "untracked" image/png
ITS FUCKING STRINGBUILDERS running this code over and over again explodes "untracked"
image/png
xgranade, 27 days ago @unormal Does it help to specify the initial capacity of the StringBuilder? E.g.: new StringBuilder(1000)?
@unormal Does it help to specify the initial capacity of the StringBuilder? E.g.: new StringBuilder(1000)?
new StringBuilder(1000)
onelson, 27 days ago @unormal real quick, could the memtest.Add call be keeping the sb alive past when it would normally GC? Would be weird if the memory profiler causes leaks like that, but idk this is weird full stop.
@unormal real quick, could the memtest.Add call be keeping the sb alive past when it would normally GC? Would be weird if the memory profiler causes leaks like that, but idk this is weird full stop.
unormal, 27 days ago @onelson sure, it's trying to keep it alive, it shouldn't be "untracked" though, it's normal-ass managed memory
@onelson sure, it's trying to keep it alive, it shouldn't be "untracked" though, it's normal-ass managed memory
onelson, 27 days ago @unormal okay. I just figured the string builder might do weird shit internally for perf, but still know how to clean up when the last ref is removed.
@unormal okay. I just figured the string builder might do weird shit internally for perf, but still know how to clean up when the last ref is removed.
unormal, 27 days ago @onelson yeah it's possible it's got an optimized path and the memory profiler has a bug/just can't see it. It's a good guess but who knows
@onelson yeah it's possible it's got an optimized path and the memory profiler has a bug/just can't see it. It's a good guess but who knows
unormal, 27 days ago jesus christ lol
jesus christ lol
unormal, 27 days ago (memory use should correctly be exploding, but it should be tracked memory use, as stringbuilders are [???] managed [???])
(memory use should correctly be exploding, but it should be tracked memory use, as stringbuilders are [???] managed [???])
mcc, 27 days ago @unormal wait wait hold on I think I know what's happening, do you want advice or are you just venting
@unormal wait wait hold on
I think I know what's happening, do you want advice or are you just venting
mcc, 27 days ago @unormal …although looking at your sample code closely uh… wow wtf
@unormal …although looking at your sample code closely uh… wow wtf
unormal, 27 days ago @mcc it reproduces in a naked project with JUST the stringbuilder loop
@mcc it reproduces in a naked project with JUST the stringbuilder loop
Add comment