diff --git a/base/HidlSupport.cpp b/base/HidlSupport.cpp
index aec3fed..8f3c057 100644
--- a/base/HidlSupport.cpp
+++ b/base/HidlSupport.cpp
@@ -273,9 +273,15 @@
     return mSize == 0;
 }
 
+sp<HidlMemory> HidlMemory::getInstance(const hidl_memory& mem) {
+    sp<HidlMemory> instance = new HidlMemory();
+    instance->hidl_memory::operator=(mem);
+    return instance;
+}
+
 sp<HidlMemory> HidlMemory::getInstance(hidl_memory&& mem) {
     sp<HidlMemory> instance = new HidlMemory();
-    *instance = std::move(mem);
+    instance->hidl_memory::operator=(std::move(mem));
     return instance;
 }
 
@@ -295,6 +301,11 @@
     return instance;
 }
 
+HidlMemory::HidlMemory() : hidl_memory() {}
+
+HidlMemory::HidlMemory(const hidl_string& name, hidl_handle&& handle, size_t size)
+        : hidl_memory(name, std::move(handle), size) {}
+
 // it's required to have at least one out-of-line method to avoid weak vtable
 HidlMemory::~HidlMemory() {
     hidl_memory::~hidl_memory();
diff --git a/base/include/hidl/HidlSupport.h b/base/include/hidl/HidlSupport.h
index e60f2f3..486fd0a 100644
--- a/base/include/hidl/HidlSupport.h
+++ b/base/include/hidl/HidlSupport.h
@@ -295,23 +295,22 @@
 // to support other type of hidl_memory without break the ABI.
 class HidlMemory : public virtual hidl_memory, public virtual ::android::RefBase {
 public:
+    static sp<HidlMemory> getInstance(const hidl_memory& mem);
+
     static sp<HidlMemory> getInstance(hidl_memory&& mem);
 
     static sp<HidlMemory> getInstance(const hidl_string& name, hidl_handle&& handle, uint64_t size);
     // @param fd, shall be opened and points to the resource.
     // @note this method takes the ownership of the fd and will close it in
     //     destructor
+    // @return nullptr in failure with the fd closed
     static sp<HidlMemory> getInstance(const hidl_string& name, int fd, uint64_t size);
 
     virtual ~HidlMemory();
+
 protected:
-    HidlMemory() : hidl_memory() {}
-    HidlMemory(const hidl_string& name, hidl_handle&& handle, size_t size)
-        : hidl_memory(name, std::move(handle), size) {}
-    HidlMemory& operator=(hidl_memory&& src) {
-        hidl_memory::operator=(src);
-        return *this;
-    }
+    HidlMemory();
+    HidlMemory(const hidl_string& name, hidl_handle&& handle, size_t size);
 };
 ////////////////////////////////////////////////////////////////////////////////
 
