IonicWind Software

IWBasic => General Questions => Topic started by: Andy on November 12, 2020, 09:25:33 PM

Title: Memory usage
Post by: Andy on November 12, 2020, 09:25:33 PM
This one I can't understand.

I decided to check a few days ago, just what size in memory was my editor program as it's still under development.

When I compile it & run it the very first time after boot it's about 8.5 MB.

When I do the above again (after closing the program) it's now showing around 24.5 MB?

Now I am using a few pointers here, and sub classing three controls, however, on close the pointers are deleted, and the controls are un subclassed.

All windows are closed as well.

Nothing is "hitching a ride" with the exe.

When I reboot, it's back to 8 MB, then as said it goes up to 24 MB but no larger.

So what could be causing it?
Any ideas anyone?

Thanks,
Andy.


 
Title: Re: Memory usage
Post by: Rock Ridge Farm (Larry) on November 13, 2020, 05:45:43 AM
I will check but I think you need to free the memory you allocate before exit.

Larry
Title: Re: Memory usage
Post by: Andy on November 13, 2020, 07:05:31 AM
Thanks Larry,

Will wait to see what you come up with.

Andy.


Title: Re: Memory usage
Post by: aurelCB on November 13, 2020, 11:14:51 AM
I see that u use a lot of pointers 
do you use memeory blocks for loading files ?
do you use array of pointers ?
all that can cause troubles..
Title: Re: Memory usage
Post by: Andy on November 13, 2020, 09:42:52 PM
The pointers I use are:

1. Array pointers - single ISTRING.
2. Array pointers - UDT type.
3. Simple single ISTRING.

Anything else I use are just normal arrays.

The last time I checked the program it was around 7 MB, and with the changes it didn't surprise me that it had gone up to 8 MB, but to jump to 24?

At 24 MB, it's still easily usable - but it's a big jump in size.

Andy.
Title: Re: Memory usage
Post by: Andy on November 14, 2020, 04:54:23 AM
I would be very interested to see what size in memory you get.

If you could go to reply number 7 here:

http://www.ionicwind.com/forums/index.php?topic=6463.msg47161#new

Download it, then run Andy' editor exe file - don't even need to load any files, just go to Task Manager and see what size it reports.

Not sure now, is it me?, my machine not working as it should etc?

Thanks,
Andy.