samskalicky commented on pull request #6292:
URL: https://github.com/apache/incubator-tvm/pull/6292#issuecomment-675572936


   > @samskalicky In tihs case the deleter is already long-lived. If the 
deletion happens during the process of already unloading of vtable or other 
global objects, then there is little that we can do to solve the problem. 
Again, in the cases where multiple dlls are involved, the best way is to avoid 
retaining global objects in python.
   
   Right, the problem could be that the `DeviceAPIManager` and its child 
`DeviceAPI` objects are shorter lived than the deleter. If we remove the 
dependency from the deleter to get the `DeviceAPI` through the (potentially 
destructed) `DeviceAPIManager` then the deleter doesnt depend on the lifetime 
of the `DeviceAPIManager` since it already has a pointer to the heap allocated 
`DeviceAPI` object. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to