     /// - Parameters:
     ///   - object: Object to be inserted.
     ///   - index: Index.
-    func insert(_ object: AnyObject?, at index: Int) {
+    public func insert(_ object: AnyObject?, at index: Int) {
         guard index < count, let strongObject = object else {
             return
         }


/// This extension adds some useful functions to NSPointerArray.
/// https://marcosantadev.com/swift-arrays-holding-elements-weak-references/
extension NSPointerArray {
    /// Adds an object to the array.
    ///
    /// - Parameter object: Object to be added.
    func add(_ object: AnyObject?) {
        guard let strongObject = object else {
            return
        }

    /// Remove an object at a given index.
    ///
    /// - Parameter index: Index.
    public func remove(at index: Int) {
        guard index < count else {
            return
        }
