Stand alone Linux RPI GUI app, detecting memory leak

Hello, thanks for looking.

I am a novice Xojo programmer, a refugee from the VB6

camp that never quite “settled” in the Xojo culture so I
am very likely doing something wrong in my code…

I have written a GUI for a scientific instrument (a Photometer)
that communicates via TCP to a GUI written in Xojo on an RPI.
I think that there may be a memory leak, (as the memory usage
climbs over time as viewed via htop / or / top)

The output from HTOP right now for this process looks as follows:

20 0 254M 72416 58336 S 4.9 7.6

Again this is basically an app that connects via TCP socket,
receives a string, and then prints it on the screen in a big font.
Nothing heroic. It also can (but does not normally) graph
an energy plot of the filters. Do these amounts of memory
(above) seem reasonable for a stand alone RPI app?

Is there a way I can  find out from within my application how

much memory the application is using? something like a mem()
command from the 80’s? I would like to know ho much memory
the app is taking from within it self, and (as a horrible fix for now)
just have the app kill itself - (its in an auto re-start script)

Along these lines, how would one have an Xojo app kill itself?
is there and equivalent to an “end” statement in xojo?

Thank you,



Check Runtime.*
It may be better to check your objects, maybe you create to much or have circulair refs.

1 Like

Hello Luigi

Did you find the cause of the memory leak?