SIGN IN SIGN UP

[3.12] gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426) (#126443)

gh-126425: Refactor `_lsprof_Profiler_enable` (GH-126426)

- Explicit memory management for `None` objects (since we still try to treat immortal objects as regular objects)
- Respect possible errors of `sys.monitoring.register_callback` call
(cherry picked from commit 75872605aa78dbdfc5c4f025b0f90a7f37ba10c3)

Co-authored-by: sobolevn <mail@sobolevn.me>
M
Miss Islington (bot) committed
786886a926fa025538f70a5a84259ab121e40782
Parent: 47d48b6
Committed by GitHub <noreply@github.com> on 11/5/2024, 12:42:33 PM