Debug PHP memory leak. Tracking Link Counter?

I have a pretty big php script that skips memory. I was able to figure out which object was leaking, but I was not able to figure out where the script was located, it was leaking. My part of the script contains a reference to a leaking object.

Is there a way to track (and preferably backtrace) where / when the PHP object has a reference count increased or decreased?

+6
source share
2 answers
+2
source

Try using:

In addition, I suggest writing code in a simple way for debugging and separating debugging procedures from code.

+1
source

Source: https://habr.com/ru/post/901980/


All Articles