Re: boxed re-registration key freeing




On Jan 28, 2009, at 4:01 PM, Kevin Ryde wrote:

muppet <scott asofyet org> writes:

It looks like gperl_boxed_register() takes precautions to insert into
the hash with the destructor second, to avoid this sort of problem.
Why isn't that working?

g_hash_table_insert() on info_by_package leaves the key string set to
the one in the original boxed_info, but it's then freed.  I think
g_hash_table_replace() will change to the key string of the new
boxed_info.  Same string contents of course, new pointer.

Augh, i should read more closely. You said that last time, but i missed it. :-)

Yes, i think that using replace instead of insert would be the way to go.



--
I hate to break it to you, but magic data pixies don't exist.
  -- Simon Cozens





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]