Skip to content

Caching should return copies of JAMSVGImage, not shared instances. #21

Description

@rwe

#17 implemented basic caching support for JAMSVGImage imageNamed:. However, rather than return copies of the cached image (which still has the primary benefit of skipping redundant SVG parsing and I/O), it returns a shared object with mutable properties.

Currently the only mutable property is scale, though if #20 is addressed, more properties could be usefully mutated.

This can cause unexpected problems and differs from expected behavior in which caches either return totally immutable shared objects or mutable copies of the original source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions