GJS docs says to use GLib.free
I was using
GLib.free()in my GNOME shell extension because https://gjs-docs.gnome.org/gio20~2.66p/gio.file#method-load_contents said so. I was told not to do it and the docs were just pulled from the C code, so I should file an issue here.
Those docs are auto-generated from C language documentation which mentions doing that. It's not supposed to, it's just supposed to say "(transfer full)" instead. The best thing you can do in this case is to file a documentation bug with the library that says that.