Code review comment for lp:~marcustomlinson/v8-cpp/test-gc

Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

Hmmm, so I've untangled my thoughts and realised again why it has to remain implemented this way.

The internal field count is set when creating the class template. This template is what we use to mould instances of the class as they are created. We only manage exported class types, even in the case of smart pointers, we are actually instantiating the underlying class type template and appending the extra smart pointer reference as the 3rd internal field.

Seeing that we need our class templates to support both normal instances as well as smart pointer instances, we have to make that 3rd internal field available in all of our templates as either variant may be constructed from them.

Hope I'm making sense?

« Back to merge proposal