Solved.
The way is to do it at destructor.....