TensorRT  7.2.1.6
NVIDIA TensorRT
Looking for a C++ dev who knows TensorRT?
I'm looking for work. Hire me!
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
polygraphy.util.misc.FreeOnException Class Reference
Inheritance diagram for polygraphy.util.misc.FreeOnException:
Collaboration diagram for polygraphy.util.misc.FreeOnException:

Public Member Functions

def __init__ (self, objs)
 
def __enter__ (self)
 
def __exit__ (self, exc_type, exc_value, traceback)
 

Public Attributes

 objs
 

Constructor & Destructor Documentation

◆ __init__()

def polygraphy.util.misc.FreeOnException.__init__ (   self,
  objs 
)
Frees the specified objects if an exception occurs in this context.
Does nothing otherwise.

Args:
    objs (List[object]): List of objects with __enter__/__exit__ methods defined.

Member Function Documentation

◆ __enter__()

def polygraphy.util.misc.FreeOnException.__enter__ (   self)
Returns the objects managed by this context manager.

◆ __exit__()

def polygraphy.util.misc.FreeOnException.__exit__ (   self,
  exc_type,
  exc_value,
  traceback 
)
On exception, deletes all tracked objects.
Does nothing if there are no exceptions.

Member Data Documentation

◆ objs

polygraphy.util.misc.FreeOnException.objs

The documentation for this class was generated from the following file: