Add release method to dma_buffer class
Add release method to dma_buffer class to allow clients to explicitly
release buffers at runtime.
@@ -66,11 +66,18 @@ public:
}
~dma_buffer()
+ {
+ release();
+ }
+
+ void release()
{
if (handle_ != nullptr)
{
fpgaReleaseBuffer(handle_, wsid_);
handle_ = nullptr;
+ virtual_address_ = 0;
+ iova_ = 0;
}
}
