+
     h  c                   sF    R .t  ! R R]4      t^ RItR t ! R R ]4      tR# )AutoFinalizedObjectc                   sN   a a ] tR t^$t oRtR tV 3R ltR tR tR t	Rt
VtV ;t# )_AutoFinalizedObjectBasezO
Base class for objects that get automatically
finalized on delete or at exit.
c                s    R# )zwActually finalizes the object (frees allocated resources etc.).

Returns: None

Derived classes should implement this.
N Zself   &6/usr/lib/python3.14/site-packages/usb/_objfinalizer.py_finalize_objectZ)_AutoFinalizedObjectBase._finalize_object*   s     	    c                s<   < \         \        V `  V 4      pRVn        V# )zCreates a new object instance and adds the private finalizer
attributes to it.

Returns: new object instance

Arguments:
* *args, **kwargs -- ignored
F)superr   __new___finalize_calledZclsZargsZkwargsZinstance	__class__   &*, r   r	   Z _AutoFinalizedObjectBase.__new__3   s$     13?D$)!r   c                s\    V P                   '       g   RV n         V P                  4        R# R# )zLHelper method that finalizes the object if not already done.

Returns: None
TN)r
   r   r   r   r   _do_finalize_objectZ,_AutoFinalizedObjectBase._do_finalize_object@   s)    
 $$$$(D!!!# %r   c                s    \        R4      h)z9Finalizes the object if not already done.

Returns: None
z6finalize() must be implemented by AutoFinalizedObject.)ZNotImplementedErrorr   r   r   finalizeZ!_AutoFinalizedObjectBase.finalizeI   s     "D
 	
r   c                s&    V P                  4        R # )N)r   r   r   r   __del__Z _AutoFinalizedObjectBase.__del__S   s    r   )r
   )__name__
__module____qualname____firstlineno__Z__doc__r   r	   r   r   r   __static_attributes____classdictcell____classcell__r   Z__classdict__   @@r   r   r   $   s(     
$
 r   r   Nc                s@    V ! 4       pVe   VP                  4        R# R# )zHelper function for weakref.finalize() that dereferences a weakref
to an object and calls its _do_finalize_object() method if the object
is still alive. Does nothing otherwise.

Returns: None (implicit)

Arguments:
* obj_ref -- weakref to an object
N)r   )Zobj_refZobjs   & r   _do_finalize_object_refr   Y   s!     )C
! r   c                   s8   a a ] tR t^it oV 3R ltR tRtVtV ;t# )r    c                s   < \         \        V `
  ! V .VO5/ VB p\        P                  ! V\
        \        P                  ! V4      4      Vn        V# )zCreates a new object instance and adds the private finalizer
attributes to it.

Returns: new object instance

Arguments:
* *args, **kwargs -- passed to the parent instance creator
                     (which ignores them)
)r   r    r	   weakrefr   r   Zref
_finalizerr   r   r   r	   ZAutoFinalizedObject.__new__k   sW    . ,c:

 
 &..-w{{8/D
 r   c                s&    V P                  4        R# )z)Finalizes the object if not already done.N)r   r   r   r   r   ZAutoFinalizedObject.finalize   s    r   r   )	r   r   r   r   r	   r   r   r   r   r   r   r   r    r    i   s     B r   )Z__all__Zobjectr   r   r   r    r   r   r   <module>r      s4   B !
!0v 0f " %2 %r   