Skip to content

Native Plugin Spatial Controller Memory Leak #84

@GePrasetyo

Description

@GePrasetyo

Describe the bug
We found on Unity Profiler that Untracked Memory Location is increasing per frame. When we isolate, we suspect that there's memory leak in Spatial Controller Native plugin especially in PollController

To Reproduce

  1. Use AccessoryTrackingHelper should be reproducable. because I'm 90% following that script to implement Spatial Controller in Unity
  2. in Unity Profiler you will see increasing Untracked Memory caused by PSVR Controller. most likely connected to PollController call per frame

Expected behavior
in idle state, your memory usage shouldn't be increasing.

Desktop (please complete the following information):

  • Device: Apple Vision Pro
  • OS: visionOS
  • Version 26.0.1

Additional context
I have the fix, seems to be working to dealocate stuff on Extensions.Swift
But I'm not a Swift programmer, I could be wrong. I can't make a PR apparently. So would be nice someone can confirm

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions