Skip to content

OpenCVForUnity.UnityUtils.Utils.renderTextureToMat has memory leak #182

Description

@CurtWachs

If I use the method OpenCVForUnity.UnityUtils.Utils.renderTextureToMat memory usage goes up constantly as I am using the method in a LateUpdate.

If I instead manually convert the RenderTexture into a Texture2D and then use OpenCVForUnity.UnityUtils.Utils.texture2DToMat there is no memory leak.

I commented out all other code in my LateUpdate aside from the Mat conversion and renderTextureToMat leaks, texture2DToMat does not.

Activity

  1. EnoxSoftware commented on Feb 10, 2024

    @EnoxSoftware
    Owner

    Thank you very much for reporting.
    Could you please tell me which version of OpenCVForUnity you tried?

  2. CurtWachs commented on Feb 11, 2024

    @CurtWachs
    Author

    I am using version 2.5.8.

  3. EnoxSoftware commented on Feb 11, 2024

    @EnoxSoftware
    Owner

    The Utils.renderTextureToMat() method does not seem to exist in OpenCVForUnity 2.5.8. What code have you tested?

  4. CurtWachs commented on Feb 12, 2024

    @CurtWachs
    Author

    My apologies, it seems the github version differs from the Asset store version. Is there somewhere better to direct my findings on that version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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