Memory Management

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Memory Management

Post by kotikoti » Wed Jun 17, 2009 11:17 am

Query: Memory Management

Hi All,
Still working in the development environment and been puzzled with what is happening. The little application reads data from a sqlite file and dumps it into a field, I do however clear any variable that was used to hold the data at the execution of SQL, and what I am seing, watching the activity monitor, memory usage by the application simply keeps creeping up.

116MB (starting memory usage of RR 2.9 plus the little utility) , 207 MB, 255 MB, 311MB and so on, this eventually freezes the application (RR) and I have to drop it at the task manager level.

For a standalone application, trend is as follows (in brackets, once I have done SQL read)
5MB (253MB), 93MB (295MB), 198MB (333MB), 242MB (367MB)

My assumption is that if I put data in a variable/fld, this will use memory accordingly, and emptying these, would free same allocation up, what is happening is but the expectation. Any thought on this will be appreciated.

Code: Select all

--cleanup

put empty into fld "Field2"
put empty into fld "Field3"
put empty into tList
put empty into tSQL
Thanks
Build 160
Version 2.9.0
Platform: Windows

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Wed Jun 17, 2009 11:26 am

Dear kotikoti,

Please, create a standalone and test again. Your problem may be caused by something in the Revolution IDE rather than your stack or the database drivers/externals.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Thu Jun 18, 2009 11:25 am

Hi Mark et all
I have tried the standalone one as well on both vista and xp, still same, memory usage creeps up...
Build 160
Version 2.9.0
Platform: Windows

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm

Post by Bernard » Sun Jun 28, 2009 12:34 pm

Are you using any global variables, script local variables, or sql cursors when you get/manipulate the SQL data?

Perhaps if we could see the code that leads up to you displaying the SQL data in the field.

Are you saying that on each fetch from the database that memory usage increases by 50mb or so?

Post Reply