LibXL Memory leak? monkeybread plugin

I have an app that simply reads a dozen excel file and lod all their rows (around 20000 each) in a database. I have done tests both using SQLite (a file) and mySQL (local server).
All that stuff running on a thread.
A quite simple stuff, but I am experiencin a HUGE amount of memory usage, growing at execution till more than 20GB!!!
I can’t find what could be the Problem, so I am guessing there is something wrong on the XL Library?
After finishing each file I set the XLBookMBS and XLSheetMBS to nil.
Xojo 2023 3 on a Mac air M2.
And Idea?

Please make a simple example.

1 Like

Hard to guess. But could be a circular references between some objects in your applications.
Can you reproduce this is a new project?

Thanks Christian.
now I am in a hurry to finish this job, once finished for sure I Will prepara a test example of the project

Hi Christian,
not solved, but found the problem…
libXl hai nothing to do with it, I Think if I’m not wrong to have found a bug on DatabaseRow, it seems that assigning a lot of times a Value to a DateTimeValue, the memory keeps growing…
I have done a Little test app(I can send it to you if you want to check quikly) .
The Little app simply loops, creating a DatabaseRow object, two datetime objects and assegn them to two fake Fields.
Even if every cycle i set everything to nel, the memory goes on and on.
Shoul I Point that as a bug or I am missing something?

1 Like

You are probably holding references in some indirect way avoiding the destruction of the objects.

Can you create a self contained sample (all lines inside just one opening() event) and publish it here so we can copy/paste to a test?

1 Like

Did you report an issue?

I just reported it:
https://tracker.xojo.com/xojoinc/xojo/-/issues/74733

2 Likes

Hi,
No, I didn’t
thank you!