The invention discloses a device and a method for detecting memory leak. The method comprises the following steps: step S202, after a memory is successfully distributed, updating memory distribution times and recording the memory distribution times and memory distribution information into a log file; step S204, when a parameter pointer is not idle and has been distributed, releasing the memory, updating memory releasing times and size, recording the times and the size into the log file, and deleting the memory distribution information from the log file; and step S206, according to the memory distribution times and the size and the memory releasing times and the size in the log file, determining the times and size of the memory not released. The method can count memory using information, detect incorrect memory release and detect memory leak information, and is quite convenient for a programmer to adjust programs so as to enhance the stability of the programs.