@should_profile_memory
def stop_memory_profiling():
 cancel_thread(SAVE_THREAD_PTR)
 dump_objects()

@ should_profile_memory def stop_memory_profiling ( ) : cancel_thread ( SAVE_THREAD_PTR ) dump_objects ( )
we cancel the save thread and dump objects for the last time .