I'm quite novice with HDF5 could you help me with attached code, i've used
sample codes, but unfortunately they do not work. Free memory for read
buffer causes exception. What is the best method to free memory? My version
of HDF is 1.8.9. Than you.
I've finally found the workaround. I've used debug configuration before, with
release everything works fine, as I understood allocation/deallocation
memory MUST have same configurations (debug/release).
I don't really like this approach but I can live with it for now.
btw HDF5 tests in src do not work either under debug
I'm quite novice with HDF5 could you help me with attached code, i've used
sample codes, but unfortunately they do not work. Free memory for read
buffer causes exception. What is the best method to free memory? My version
of HDF is 1.8.9. Than you.
I think the problem is that the library currently does not provide a
matching H5XYZfree call
for some of the resources it allocates for you. Non C APIs compound the
problem and lead to the
obscure behavior you're seeing. 'free' is a well-intended guess, but still a
guess.
I've finally found the workaround. I've used debug configuration before,
with
release everything works fine, as I understood allocation/deallocation
memory MUST have same configurations (debug/release).
All software must use the same version of the C runtime (CRT) in order to
avoid errors when CRT objects such as allocated memory are passed between
libraries and/or executables. Since Microsoft implements each CRT in a
separate library (dll), you can't allocate memory in one CRT and free it in
another without risking heap errors. You should also never statically link
to the CRT since each library/exe will have its own private version of the
CRT.
You can check the linked versions with dumpbin /imports via a Visual Studio
command prompt, though I don't think that will show static linkage.
"Same version" means 32/64-bit, debug/release, and Visual Studio version.
We currently don't distribute debug binaries though there are plans to do
so in the near future.
I'm working on a document describing this in more detail. It should appear
on the web sometime soon, hopefully this month.
Cheers,
Dana
···
On Thu, Nov 8, 2012 at 11:17 AM, sahon <ssahon@gmail.com> wrote: