Reliable package Unloading?

The Package Class has a very handy way of loading in map packages, but there is no RELIABLE class function call that would de-allocate the package explicitly.

The current method I’m using is removing the reference to the loaded package and calling COLLECT_GARBAGE() in hopes that the memory will be de-allocated.

My question is that is there any more reliable way to Unload a package?

Thank you

There is an interesting unload packages BP node, that supposedly does exactly what I want, so I wonder if there is any c++ source code equivalent: