Open maxpietsch opened 4 years ago
OK, as far as I can tell, it should be reusable as long as the corresponding Header
doesn't go out of scope. But as soon as the ImageIO::Pipe::unload() method is called, all bets are off... This method only gets called from ImageIO::Base::close(), which as far as I can tell, only gets called in the Header destructor.
But it does mean that if it was loaded the first time, it will remain loaded until its Header is destroyed. Most of the time, that should be benign since it'll be accessed via memory-mapping - but if you happened to request direct IO with non-matching strides or data type, then it will indeed end remaining in your heap...
I'm not sure what's going on in mrregister
that triggers this, maybe you can elaborate?
Currently writing transformed images fails when they were piped into
mrregister
:Can piped images be reused within the same app without explicitly loading them to memory?
somewhat related to #1806