Console App Memory Question

Hi everyone,

I have some questions regarding memory consumption issues I have noticed with my compiled Console Application running on OSX and Linux. To keep this high level and not full of crazy detail to start just understand that my console app says in a loop in the run method until I purposely kill it. I am noticing that every time I go through a loop of ALOT of Code the memory consumption increments and stays. At the top of each loop it sits waiting for my protocol to connect to give it additional instructions before it continues. The memory stays at this new elevated memory consumption until it begins the loop again with more increments. I expected the Memory to decrease after the code processed and object classes were then destroyed, but not so far.

For example it starts at 2.0MB and ends up around 2.4MB on the first run. It loops, receives additional instructions, and loop processes the 2nd run which it goes up to around 2.7-2.8MB. This continues every time I iterate in the loop.

Hopefully without opening any cans of worms … :slight_smile: Are these expected results?

Thank you in advance!

I’m also trying to track down app here with memory consumption.

Do you use ServerSocket?
I have the feeling that sockets here accumulate in memory without being freed.

That doesn’t sound like expected behavior. Try spitting out Runtime.MemoryUsed and Runtime.ObjectCount to see if Xojo thinks you’re disposing of your objects properly.

[quote=58424:@Christian Schmitz]I’m also trying to track down app here with memory consumption.

Do you use ServerSocket?
I have the feeling that sockets here accumulate in memory without being freed.[/quote]
The EVIP Protocol I created is a subclass of TCPSockets as the same for my TELNET class that is hitting the devices.

Thanks Tim I will check this.

This is either a memory leak in the framework, or one you’ve created yourself through circular references. Hope it’s the latter because those are much easer to track down.

I do hope its the latter and I am sure it is. This type of troubleshooting is new to me so I appreciate all of the help!

If it’s the type of code you can share, I’d be happy to be your second set of eyes.

THanks Kem. I am out of the office heading to dinner with the kids now. Ill get back on this tonight :slight_smile: THanks again!

So what you’re saying is, you’re willing to put your kids ahead of your coding? I don’t like your attitude…

After 60 hours this week (so far) of coding :slight_smile: yes :slight_smile: :slight_smile:

60 ? Thats it ? Slacker :stuck_out_tongue:

Norman’s at 65 hours, and that’s just today.

I think everyone (me included) has been working a ton to get r2, r3 (plus point releases), r4 and now 14r1 ready and prepare for the conference
I think I’ve been the slacker lately only working 70-75 hour weeks :stuck_out_tongue:

Honestly, sleep is overrated. For you, I mean.

Haha :slight_smile: unfortunate that was just my time coding :slight_smile: Norm I thought you were 90 hours a week minimum? :wink:

Hence

:slight_smile: You guys are too funny :wink: When you convert “Alberta” time you multiple by 3 so you are actually pretty good for your CEO in Texas. That is of course on top of the normal time zones :slight_smile: :slight_smile:

I’m working 210 hours a week ?
wow !

Phew, you are a hard working dude what can I say :slight_smile: