Recommended Posts

wow! thats some nice stuff zogo! Dropped mine from 30mb to on avg 3.5mb! :D my mem always was jumping on mouse over/out for my buttons...so i just added it to my button class so every other time the state changes on a button, it does this mem thing :)

It's quite safe doing it this way, the windows API just clears out garbage rather than .net keeping a space for it. It wouldn't be suitable for games etc. because they need anything they can get but if your writing something else then this code raises cpu usage very very marginally. It doesn't clear the memory as such it just sets a fence around the process in mem usage size. I'm pretty sure that many of the programs which "optimize" your memory usage use this function but they use it for all programs. Cheers for trying it SkyyPunk :) enjoy...

Oh and I just read your other post Nazgulled it sounds to me like your using some memory intense functions in there, do you use threading or loops at all?

when you say it creates a fence...it doesnt appear to do that for mine...on first try, i just had it executy at formload, and that dropped it to around 15mb or so, but as soon as i through my mouse over my buttons and whatnot it got back up to around 27mb...

oh and sorry for hijacking your thread nazgulled :whistle:

well basically when it calls with the values i set it sets a fence only for that spot in time, you could change the min value to 0 and max value to something higher to create a real fence...

Nazgulled - What sort of things are you looping over, generally speaking loops,threading & timers seem to me to be the real mem/cpu hogs.

  • 4 months later...
Nazgulled - What sort of things are you looping over, generally speaking loops,threading & timers seem to me to be the real mem/cpu hogs.

585729037[/snapback]

Just saw this now :blush:

you probably won't read this but... i'm not using much loops at all, just one to load all the note names into the dropbox and when a new note is created it loads all of them again, that's about the all loops I remember. no threading at all and timers, I ahve one, which currently it's just there but i'm not using it at all... I guesse I forgot to remove it when I started using the AnimateWindow API

  • 3 weeks later...
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.