Closed njroussel closed 4 months ago
This PR fixes a potential cyclic dependency when using dataclasses in dr.alloc_local.
dr.alloc_local
The following code snippet would leak
from dataclasses import dataclass import drjit as dr if __name__ == "__main__": @dataclass class SampleData: data: dr.llvm.ad.Float some_float = dr.llvm.ad.Float([1, 2, 3]) default = SampleData(some_float) sample_data = dr.alloc_local(SampleData, 10, default)
The default value and dtype information are sources of cyclic dependencies.
dtype
This PR fixes a potential cyclic dependency when using dataclasses in
dr.alloc_local
.The following code snippet would leak
The default value and
dtype
information are sources of cyclic dependencies.