free up memory used by profile feature

Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>