Image3D/Field3D swap() function unsafe with Managed[Image/Field]3D
Before the changes to MemoryManager, an image/field could safely swap() with a managed object. This is no longer the case, as now the underlying memory is owned by the MemoryManager and not the containing Image/Field. This introduced a bug in MultiscaleResampler, which swap()ed memory with managed objects. The overall functionality may stay broken (it's not really surprising that swap()ing with managed object could be unsafe), but it should be looked at to see if there is an easy fix. The difference from previous versions should at least be noted.
Comments (3)
-
reporter -
This is because we don't want to swap an unmanaged mempool in for a managed one right? This is tricky. I hadn't ever used
swap()
before. Is there a way to do this within python maybe, where the actual types swap also? -
Is there a reason we can't do this in python?
I, J = J, I
I think that just swaps the references right?
- Log in to comment
Fixed some bugs in MultiscaleResampler introduced during MemoryManager restructuring, see issue #40
→ <<cset 60f6477d0599>>