Closed mattjala closed 1 year ago
Stinks that all object now will have their own copy of the domain. Too bad this isn't implemented in c++ so that you can use shared_ptr. Copying the domain's RV_object_t into new memory now pulls in the fapl and fcpl. If these were to be utilized somehow from the children, they have the potential to be corrupt after the the real domain file closes.
Could you add a reference count to the RV_file_t that increment the reference count when copied and RV_file_close will decrement the reference count and close the file resources when reference count is 0. You could use RV_file_close on the domain of all the objects.
@mattjala, nice use of reference counting for the domain. Pull request tested great. One problem is that MS VS doesn't allow adding to void*. rest-vol.c line 1270 had to be changed to:
memcpy(buffer, (const char*)uinfo->buffer + uinfo->bytes_sent, data_size);
Groups, datasets, and datatypes from an external file now correctly indicate this in their domain field upon being opened.
H5Oget_info_by_name now correctly retrieves external links' domain.
Fix for #24 , #30