I get an error message about sharedMesh leaking when I add a modifier

This message can safely be ignore, it is a false error that Unity gives to any system that alters a mesh in Edit Mode, so all systems that build or alter meshes while not in run mode will produce the error eg RageSpline, ezGUI etc. Rest assured there are no leaked meshes and nothing is actually wrong. The error does not happen during runtime.