Currently LeakDetector exposes its singleton instance via public static let instance = LeakDetector() to the users of this library. Should it really be exposed as it doesn't seem to have any intended usage by the developers building applications with RIBs? Even more, should any of the methods, static or public, of the LeakDetector class be exposed to the library users?
Leak detection seems to be an internal mechanic of RIBs and besides exposing an override for debugging there doesn't seem to be any need in giving users access to it.
By hiding the internals and the public API of the LeakDetector we can make easier and safer future optimizations of it or internal API changes without introducing breaking changes to consumers of the library.
Currently
LeakDetectorexposes its singleton instance viapublic static let instance = LeakDetector()to the users of this library. Should it really be exposed as it doesn't seem to have any intended usage by the developers building applications with RIBs? Even more, should any of the methods, static or public, of the LeakDetector class be exposed to the library users?Leak detection seems to be an internal mechanic of RIBs and besides exposing an override for debugging there doesn't seem to be any need in giving users access to it.
By hiding the internals and the public API of the LeakDetector we can make easier and safer future optimizations of it or internal API changes without introducing breaking changes to consumers of the library.