genericptr / pascal-language-server

LSP server implementation for Pascal
GNU General Public License v3.0
53 stars 15 forks source link

Fix memleak initialization #43

Closed mvancanneyt closed 1 year ago

mvancanneyt commented 1 year ago

Hello Ryan,

This patch must merged after the previous one.

It fixes a whole bunch of memory leaks: some are specific to the way process is working and will apply to all calls, some fixes are specific to the initialize call.

If you look in LSP.General, you will see how TPersistent descendents must be coded. The same principle must now be applied to all TPersistent descendents:

With this patch, the server runs and the 'Initialize'call is executed without any memory leaks when the binary stops.