hi.
i'm using timer quite frequently, to delay the repaint() so that changes of my pictures can be seen.
however i notice that everytime the timer is called, a memory of about 850 is consumed... this eventually causes my app to run out of memory.

the code:

//***********************************
private void explosionTimer(){
TimerTask task =
new TimerTask() {
public void run() {

runSomething();
explodeTimer = null;
}
};
explodeTimer = new Timer();
explodeTimer.schedule(task, 500);
}

//************************************

if i call the runSomething() alone then there'll be no memory problem.
Am I using timer correctly? or is there any other method to delay function calls? or is the way i set the timer to null is wrong?

hope that someone can help. thanks

lingtze1