(self, storage)
| 34 | __slots__ = ["cdata", "_free_weak_ref"] |
| 35 | |
| 36 | def __init__(self, storage): |
| 37 | self.cdata = storage._weak_ref() |
| 38 | # Save a direct reference to _free_weak_ref because the `torch` module |
| 39 | # might be cleared during Python shutdown before this module is cleared. |
| 40 | self._free_weak_ref = torch.Storage._free_weak_ref # type: ignore[attr-defined] |
| 41 | |
| 42 | @classmethod |
| 43 | def from_weakref(cls, cdata): |
nothing calls this directly
no outgoing calls
no test coverage detected