Skip to content

Commit

Permalink
Refactor close() method in Clip class to release resources and delete…
Browse files Browse the repository at this point in the history
… object
  • Loading branch information
SohamTilekar committed Mar 26, 2024
1 parent 9897ec3 commit aff8128
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions vidiopy/Clip.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,9 @@ def copy(self):

def close(self):
"""
Release any resources that are in use.
Release any resources that are in use. & Delete the object.
"""

# Implementation note for subclasses:
#
# * Memory-based resources can be left to the garbage-collector.
# * However, any open files should be closed, and subprocesses
# should be terminated.
# * Be wary that shallow copies are frequently used.
# Closing a Clip may affect its copies.
# * Therefore, should NOT be called by __del__().
pass

def __enter__(self):
return self
Expand Down

0 comments on commit aff8128

Please sign in to comment.