Class NSObject

    • Constructor Summary

      Constructors 
      Constructor Description
      NSObject​(long ptr)
      Initializes a new NSObject instance which is to represent a specific Objective-C object.
    • Constructor Detail

      • NSObject

        public NSObject​(long ptr)
        Initializes a new NSObject instance which is to represent a specific Objective-C object.
        Parameters:
        ptr - the pointer to the Objective-C object to be represented by the new instance
    • Method Detail

      • getPtr

        public long getPtr()
        Gets the pointer to the Objective-C object represented by this instance.
        Returns:
        the pointer to the Objective-C object represented by this instance
      • release

        public void release()
        Decrements the reference count of the Objective-C object represented by this instance. It is sent a dealloc message when its reference count reaches 0.
      • release

        public static void release​(long ptr)
        Decrements the reference count of a specific Objective-C object. It is sent a dealloc message when its reference count reaches 0.
        Parameters:
        ptr - the pointer to the Objective-C object to decrement the reference count of
      • retain

        public void retain()
        Increments the reference count of the Objective-C object represented by this instance.
      • setPtr

        protected void setPtr​(long ptr)
        Sets the pointer to the Objective-C object represented by this instance.
        Parameters:
        ptr - the pointer to the Objective-C object to be represented by this instance