larroy commented on a change in pull request #14480: Tidy up storage allocation and deallocation URL: https://github.com/apache/incubator-mxnet/pull/14480#discussion_r269290392
########## File path: src/storage/cpu_shared_storage_manager.h ########## @@ -115,13 +115,18 @@ class CPUSharedStorageManager final : public StorageManager { }; // class CPUSharedStorageManager void CPUSharedStorageManager::Alloc(Storage::Handle* handle) { + if (handle->size == 0) { + handle->dptr = nullptr; Review comment: The default value of dptr is nullptr, why do we have to set it again? is there some hidden complexity that should be documented? ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services