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

Provide memory manager overriding api #325

Closed
wants to merge 1 commit into from
Closed

Provide memory manager overriding api #325

wants to merge 1 commit into from

Commits on Jan 25, 2019

  1. Provide memory manager overriding api

    This provides a new interface for creating compress and decompress
    streams with an already initialized memory manager. By adding a new
    function this doesn't break compatability with old clients. The new api
    assumes that either mem has been initialized and is ready to go or that
    it is NULL and will be initialized as normal.
    
    Without this it is problematic to actually fully override the default
    memory manager. The main issue is that the memory manager is that the
    jpeg_create_* functions initialize the default memory manager and then
    use it to allocate some items before returning. If the memory manager is
    replaced after this the original memory manager will never have the
    destruct called. If the destruct is called manually it will free memory
    that is still in use by structures in cinfo.
    Dan Dedrick committed Jan 25, 2019
    Configuration menu
    Copy the full SHA
    d951278 View commit details
    Browse the repository at this point in the history