library: implement explicit free method