filcuc/nimqml

Making Arc compatible

shayanhabibi opened this issue · 1 comments

From my understanding, there are no cyclical references within nimqml.

Using new(typedesc, finalizer) should also implicitly lift into =destroy procs.

From my basic fiddling, this can be pretty easily implemented already by reordering constructor and delete procs within nimqml making use of forward declarations to prevent destructors being implicitly generated before we define them using new in our constructors.

This has some impact on ux due to the same being required within QtObject definitions. However this is not that big of a deal since we just forward declare delete and setup and define them below our constructor proc.

This should make multithreading with nimqml far easier. Naturally caution must be taken when manipulating memory owned by the UI thread.

Combining CPS and the nimqml event loop however is something of interest to me that will be explored later.

Nevermind, this might have been relevant to an older version of nimqml but I'm not having issues at the moment with the most recent vers.