← Back to team overview

dolfin team mailing list archive

Re: Use of Array<type> class (in assembly)

 

> I am pretty sure the shared_array object were added as a simple way of
> deciding ownership of the data. If the creation of the shared_array is costly
> we could use a ownership flag instead.

Or maybe two different classes. The thing is, ownership of Array<>
data is not known: if it's created with the (uint,T*) constructor then
the contents will be deleted by whoever owns the T*, and it's not safe
to hold references to it. Or so it seems to me.

But yes, it's fairly costly.

-- 
j.


Follow ups

References