Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api: use shared_ptr for ImageCache and TextureSystem #4377

Merged
merged 3 commits into from
Aug 16, 2024

Commits on Aug 14, 2024

  1. api: use shared_ptr for ImageCache and TextureSystem

    Change IC::create() and TS::create() to return shared_ptr instead of
    a raw pointer. This cleans up a lot of lingering lifetime management
    issue of these classes. The switch to 3.0 is an opportunity to make
    breaking changes to these APIs.
    
    For the sake of downstream users, we define
    OIIO_IMAGECACHE_CREATE_SHARED and OIIO_TEXTURESYSTEM_CREATE_SHARED to
    signal that the new APIs are present. Some very minor changes may be
    needed at the call site.
    
    Signed-off-by: Larry Gritz <lg@larrygritz.com>
    lgritz committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    e37deb9 View commit details
    Browse the repository at this point in the history
  2. Use std::move to avoid extra ref count incr/decr

    Signed-off-by: Larry Gritz <lg@larrygritz.com>
    lgritz committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    61810df View commit details
    Browse the repository at this point in the history
  3. Remove unnecessary IC reset

    Signed-off-by: Larry Gritz <lg@larrygritz.com>
    lgritz committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    7ac7644 View commit details
    Browse the repository at this point in the history