Memory management
First Claim
1. A machine implemented method for switching ownership of a view of an application displayed on a display of a device, comprising:
- constructing, with the device, a data structure having a hierarchy of layers with at least one layer being associated with the view;
sending, with the device, a delegate function call to the view from a layer associated with the view in order to generate content provided by the view, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer;
receiving notification that the layer will be removed from the data structure;
removing, with the device, the layer from the data structure and removing the first pointer reference to the view; and
switching, with the device, ownership of the view such that the view has a retained count of at least one.
1 Assignment
0 Petitions
Accused Products
Abstract
At least certain embodiments of the present disclosure include a method for memory management of a view of an application displayed on a display of a device. The method includes constructing a data structure having a hierarchy of layers with at least one layer being associated with the view. The method further includes storing the data structure in memory. The method further includes maintaining a retained count of the number of references to the view from other objects. The method further includes deallocating the view from memory if the retained count is zero. As discussed above, the retained count of the view will be decremented if the layer is removed from the data structure. Removing the layer from the data structure may occur based on the view associated with the layer being removed from the display of the device.
92 Citations
25 Claims
-
1. A machine implemented method for switching ownership of a view of an application displayed on a display of a device, comprising:
-
constructing, with the device, a data structure having a hierarchy of layers with at least one layer being associated with the view; sending, with the device, a delegate function call to the view from a layer associated with the view in order to generate content provided by the view, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; receiving notification that the layer will be removed from the data structure; removing, with the device, the layer from the data structure and removing the first pointer reference to the view; and switching, with the device, ownership of the view such that the view has a retained count of at least one. - View Dependent Claims (2, 3, 4)
-
-
5. A machine readable non-transitory medium storing executable program instructions which when executed cause a data processing system to perform a method comprising:
-
constructing, with the system, a data structure having a hierarchy of layers with at least one layer being associated with the view; sending, with the system, a delegate function call to the view from a layer associated with the view in order to generate content provided by the view, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; receiving notification that the layer will be removed from the data structure; removing, with the system, the layer from the data structure and removing the first pointer reference to the view; and switching, with the system, ownership of the view such that the view has a retained count of at least one. - View Dependent Claims (6, 7, 8)
-
-
9. An apparatus, comprising:
-
constructing a data structure having a hierarchy of layers with at least one layer being associated with the view; sending a delegate function call to the view from a layer associated with the view in order to generate content provided by the view, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; receiving notification that the layer will be removed from the data structure; removing the layer from the data structure and removing the first pointer reference to the view; and switching ownership of the view such that the view has a retained count of at least one. - View Dependent Claims (10)
-
-
11. A machine implemented method for memory management of a view of an application displayed on a display of a device, comprising:
-
constructing a data structure having a hierarchy of layers with at least one layer being associated with the view; storing the data structure in memory; maintaining a retained count of the number of references to the view from other objects, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; receiving notification that the layer will be removed from the data structure and removing the first pointer reference to the view; and switching ownership of the view if the layer is removed from the data structure such that the view has a retained count of at least one. - View Dependent Claims (12, 13, 14, 15)
-
-
16. A machine readable non-transitory medium storing executable program instructions which when executed cause a data processing system to perform a method comprising:
-
constructing a data structure having a hierarchy of layers with at least one layer being associated with the view; storing the data structure in memory; maintaining a retained count of the number of references to the view from other objects, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; receiving notification that the layer will be removed from the data structure; and switching ownership of the view if the layer is removed from the data structure such that the view has a retained count of at least one. - View Dependent Claims (17, 18, 19, 20)
-
-
21. An apparatus, comprising:
-
means for constructing a data structure having a hierarchy of layers with at least one layer being associated with the view; means for storing the data structure in memory; means for maintaining a retained count of the number of references to the view from other objects, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; means for receiving notification that the layer will be removed from the data structure; and switching ownership of the view if the layer is removed from the data structure and the first pointer reference is removed such that the view has a retained count of at least one. - View Dependent Claims (22)
-
-
23. A device comprising:
-
an input panel which is configured to receive user input; a display device integrated with the input panel; a central processing unit coupled to the input panel; a memory coupled to the processor, the memory being configured to store objects that have a retained count greater than or equal to one, with the retained count based on the number of pointer references pointing to the object; and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the programs including; instructions for incrementing and decrementing the retained count of the objects, wherein a first pointer reference points from the layer to the view based on the delegate function call, a second pointer reference points from the view to the layer; and instructions for switching ownership of an object if the layer is removed from the data structure and the first pointer reference is removed such that the object has a retained count of at least one. - View Dependent Claims (24, 25)
-
Specification