Closed ghost closed 7 years ago
@orbifx Can you squash this into fewer commits?
Can you use this for now? http://stackoverflow.com/questions/11396069/squash-to-only-one-proper-commit-for-github-pull-request/36377439#36377439
I'll squash future commits before pushing to my master in the future.
It seems that we register global root both in caml_create_QQmlPropertyMap
and in saveCallback
. Is it really required?
Also, mallocing fv
in caml_create_QQmlPropertyMap
seems really fishy. Can you add some comments why it is needed?
Regarding caml_create_camlpropertymap
: Yeah there is probably a duplication of registration. But I think we should go with the one after malloc
.
Rergarding mallocing fv
: Since we are allocating the PropertyMap using caml_alloc_
.. we can't have a registered value within it. It has to be in a memory location not controlled by OCaml's garbage collector.
So, you basically want to say that we can't have a global root which is a field of some block in heap?
Correct.