I’ve had similar issues when trying to Python run app in process. Honestly, `subprocess` is a pain sometimes, especially with cleanup.
One trick I use is wrapping the process in a context manager to ensure it gets cleaned up properly. Also, `signal` can help with graceful termination.
For memory leaks, try `objgraph`—it’s a bit niche but super useful for tracking down leaks.
One trick I use is wrapping the process in a context manager to ensure it gets cleaned up properly. Also, `signal` can help with graceful termination.
For memory leaks, try `objgraph`—it’s a bit niche but super useful for tracking down leaks.
