polling
I've been working on a Javelin project that requires polling a flash memory until it stumbles across a change in the data. However I keep running into a out of memory error. I was wondering if anyone could supply me with a javelin polling program that won't render the out of memory error?
Comments
or in general add strings or use the new keyword in a loop, you will keep
getting those errors.
Post your program so we can see what causes the error.
regards peter
do{
· String newStringObject = someObject.toString();
}while(!someObjectArray.isEmpty());
what happens is that each time there is a loop it creates a whole new instance of the variable, which sucks up memory.· An easy fix for the example above would be something like:
String theVariable = "";
do{
· theVariable = someObject.toString();
· //do stuff with theVariable
}while(!someObjectArray.isEmpty());
this way it uses the same variable over and over again.
Hope this helps, if not it could be a good hint.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Huey
Double Bachelor of Science
CPET - Computer Engineering Technologies
CIS - Computer Information Systems
MSU-Northern
Chair of MSU-Northern IEEE Student Branch