create a ExceptionThrower object and call ThrowException within a looped try except block
importosimport__main__importclr# bin dir must be adjusted to your relative path!bin_dir=os.path.abspath(os.path.join(os.path.dirname(__main__.__file__), '../Source/LeakingExceptions/bin/Debug'))
clr.AddReference(os.path.join(bin_dir, 'LeakingExceptions'))
fromLeakingExceptionsimportExceptionThrowerthrower=ExceptionThrower()
whileTrue:
try:
thrower.ThrowException()
except:
pass
in the task manager you can then watch the application to accumulate memory and never release it
Activity
call tp_clear of base unmanaged type when a reflected CLR object inst…
call tp_clear (if any) of base unmanaged type when a reflected CLR ob…
call tp_clear (if any) of base unmanaged type when a reflected CLR ob…