Skip to content

ManagedArray reallocation/copy/size semantics. #323

@mdavis36

Description

@mdavis36

There is no functionality to "invalidate" a copy of a ManagedArray nor query if it has been invalidated. I strongly believe any copy of a ManagedArray should maintain it's relationship to the underlying allocations it is pointing to, this upholds proper reference semantics copying and is why pointer records exist.

This tests the behavior changed in the size member function of a MA seen above. Perhaps this points to a disconnect between the expected behavior of a MA and a gap in the interface. Chai needs to either be explicit about invalidating copies upon reallocation or maintain correct relationships between.

Originally posted by @mdavis36 in #298 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions