if i would use OBJ_FLAG_MEMORY for "hashtab" . how i should manage freeing memory if for example im "overwriting" its key content ? do i need to delete associated object value of that key before assigning new one ? i just noticed that it costs a lot of cpu cycles . anyway …
would it be better to use OBJ_FLAG_DATA and use "chuck" method for particular key ? but how to … manage it all :/
The difference between hashtab_store_safe() and hashtab_store() is what happens in the event of a collision in the hash table. The normal hashtab_store() function will free the existing value at the collision location with sysmem_freeptr() and then replaces it.
… actually, I suspect the text is not 100% accurate, as in the standard case the value should get freed with object_free() – iirc, I checked this out at some point. But with OBJ_FLAG_MEMORY things should be as described.