handle class for memory management