sentry-unity
sentry-unity copied to clipboard
Subscribe to `lowMemory` event
When Unity raises a lowMemory event, the SDK should add a breadcrumb.
Potentially, we can also persist a file to help heuristics on restart flag a OOM crash, or simply add that N seconds/minutes before there was a low memory warning.
Another alternative is to raise a warning event but that might be better as a opt-in feature, where users can check a checkbox in Sentry's editor UnityWindow
Relevant to docs:
This event is supported on iOS, Android, and Universal Windows Platform (UWP).
Potentially use the same heuristics used on the iOS SDK: https://docs.sentry.io/platforms/apple/configuration/out-of-memory/ /cc @philipphofmann
The low memory notification and OOM are not connected on the Cocoa SDK because there is no guarantee that the OS posts a low memory notification before receiving an OOM. All we do is adding a breadcrumb.