Skip to content

False memory leak warning #63

@FromenActual

Description

@FromenActual

TLDR; the leakDetection() in OpenCvPipeline.java is not quite correct, the garbage collection offset calculation is wrong.

We found during our competition last weekend, this memory leak warning came up while sitting in init() for exceptionally long times. Today I let it sit for about 25 minutes, and it claimed over 20GB of RAM was leaked. I believe the Control Hubs only have 1GB of RAM, so there's no way this is possible.

image

Looking at the Profiler in Android Studio shows the garbage collector is actually doing its job, and never exceeding ~400MB.

android_ram

So looks like the garbage collection offset in that code is not correct, needs to be updated.

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