memory leak problem solved