-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
def get_video_capture2(timeout=1):
try:
ReturnValue = func_timeout(timeout , cap .read)
return ReturnValue
except FunctionTimedOut:
print("cap .read could not complete within {} seconds and was terminated".format(timeout))
except Exception as e:
print("Exception in cap.read() = {}".format(e))
Here is my python function where I use func_timeout.
without func_timeout memory leak is not found in this code.
I also try to free an object using del obj, but no changes were detected.
using del obj, python code
def get_video_capture2(timeout=1):
global frame
try:
ReturnValue = func_timeout(timeout , cap .read)
frame = ReturnValue
del ReturnValue
return True
except FunctionTimedOut:
print("cap .read could not complete within {} seconds and was terminated".format(timeout))
except Exception as e:
print("Exception in cap.read() = {}".format(e))
so how can I free my memory ??
Metadata
Metadata
Assignees
Labels
No labels