hdf5/c++
Binh-Minh Ribler 98d1c2d9a9 [svn-r26655] Purpose: Fixed HDFFV-7947
Description:
    When copy constructor or constructor that takes an existing id is invoked,
    the C ref counter stays the same but there is an extra C++ object which
    later is destroyed and may cause the HDF5 id to be closed prematurely. The
    C++ library needs to increment the ref counter in these situations, so that
    the C library will not close the id when it is still being referenced.

    However, the incrementing of ref count left some objects opened at the end
    of the program, perhaps, due to compiler's optimization on cons/destructors.    The constructor, that takes an existing id, needs to increment the counter
    but it seems that the matching destructor wasn't invoked.  The workaround
    is to have a function for each class that has "id" that only sets the id
    and not increment the ref count for the library to use in these situations.
    These functions are "friend" and not public.

    The friend functions are:
        void f_Attribute_setId(Attribute *, hid_t)
        void f_DataSet_setId(DataSet *, hid_t)
        void f_DataSpace_setId(DataSpace *, hid_t)
        void f_DataType_setId(DataType *, hid_t)
Platforms tested:
    Linux/64 (platypus)
    Linux/32 2.6 (jam gnu and Intel 15.0)
    SunOS 5.11 (emu)
2015-03-30 12:58:44 -05:00
..
examples [svn-r26594] Merge macros and fortran changes from dual_binary feature. 2015-03-25 17:08:46 -05:00
src [svn-r26655] Purpose: Fixed HDFFV-7947 2015-03-30 12:58:44 -05:00
test [svn-r26655] Purpose: Fixed HDFFV-7947 2015-03-30 12:58:44 -05:00
CMakeLists.txt [svn-r26208] Update cmake minimums 2015-02-18 11:56:22 -05:00
COPYING [svn-r22170] Removed extraneous svn executable properties from non-executable files. 2012-03-28 14:30:59 -05:00
Makefile.am [svn-r13264] Updated Makefile.am with new THG copyright notice. 2007-02-07 17:28:58 -05:00
Makefile.in [svn-r26509] Run reconfigure after merges from autotools_rework branch. 2015-03-20 14:15:51 -05:00