free mem when not using mouse