free allocated CArrays and current_match
Image allocation refactoring