When I use something like (Xojo2015r4 on Windows):
[code]dim a as int32
dim b as xojo.core.date
for a = 1 to 10000
b = xojo.core.date.now
stdOut.writeLine(a.toText + " : " + runtime.memoryUsed.toText)
next a[/code]
or
[code]dim a as int32
dim b as text
for a = 1 to 10000
b = xojo.core.date.now.toText
stdOut.writeLine(a.toText + " : " + runtime.memoryUsed.toText)
next a[/code]
the amount of memory increases dramatically and never releases. This is the case even if this were called within a function/sub. Can anybody confirm this before I attempt to file a feedback?
As i tried it, this used memory is indeed only free’d after quitting the program.
Well, this sucks. I use it for every tcp socket transaction as a timestamp. Took me about 4 hours to narrow the leak down to this. I can’t do crap without this and the exception leak fixed.
Seems to be already submitted. Thanks, Andre.
41153 - xojo.core.date memory leak
What about classic date ? From what I see, this does not leak one bit :
[code] dim a as int32
for a = 1 to 10000
dim b as new date
stdOut.writeLine(a.toText + " : " + runtime.memoryUsed.toText) + b.SQLDateTime
next a[/code]
[quote=237836:@Michel Bujardet]What about classic date ? From what I see, this does not leak one bit :
[code] dim a as int32
for a = 1 to 10000
dim b as new date
stdOut.writeLine(a.toText + " : " + runtime.memoryUsed.toText) + b.SQLDateTime
next a[/code][/quote]
Well, let me rephrase that. I use the date object to timestamp the tcp packets; however, I also use it in other areas throughout the application to mark incoming data from the serial and process those against other dates. One awesome feature of the new framework xojo.core.date is that you can do straight arithmetic with it. I can go back to the older date, and will if I have too… but I’m willing to wait a month or so to see if this gets any love first. I’m working on a new firmware now that isn’t immediate. Compared to my old stuff, this one is light years better and more efficient (if we can just get the new framework stuff working, which I know they will… 99% of it is perfect, and that last 1% is only recently found and what I’m running into here). The new framework IS the way to go… and I’m willing to wait. I know I seem irritated in my post, and I am… but it’s just temporary frustration.