iOS 5.1 leaks when using UIPageControl

Originator:addstudios
Number:rdar://11070719 Date Originated:3/18/2012
Status:Duplicate/10703036 Resolved:Yes
Product:iOS SDK Product Version:5.1
Classification:Performance Reproducible:Yes
 
Summary:
iOS leaks when UIPageControl is scrolled.


Steps to Reproduce:
1. Download the PageControl project from the iOS Developer Library.
2. Open the project in Xcode 4.3.1.
3. Upgrade the debugger from GDB to LLDB.
4. Profile the project using the Leaks instrument.


Expected Results:
No Leaks

Actual Results:
Each time the a new page is scrolled, a 48 byte leak occurs.

Regression:

Notes:
I have recreated this bug using the iPhone 5.1 simulator and an iPhone 4 running iOS 5.1.  Debug results from instruments follow.

Leaks:
Leaked Object	#	Address	Size	Responsible Library	Responsible Frame
Malloc 48 Bytes,3	< multiple >	144 Bytes	libsystem_c.dylib	strdup
 Malloc 48 Bytes,1	0x1aea90	48 Bytes	libsystem_c.dylib	strdup
 Malloc 48 Bytes,1	0x1aeb00	48 Bytes	libsystem_c.dylib	strdup
 Malloc 48 Bytes,1	0x1ba2e0	48 Bytes	libsystem_c.dylib	strdup
Malloc 48 Bytes,1	0x1ad200	48 Bytes	libsystem_c.dylib	strdup

Call Tree (Obj-C only)
Bytes Used	# Leaks		Symbol Name
    192 Bytes  100.0%	4	 	-[UIApplication sendEvent:]
    192 Bytes  100.0%	4	 	 -[UIWindow sendEvent:]
    192 Bytes  100.0%	4	 	  -[UIWindow _sendGesturesForEvent:]
    192 Bytes  100.0%	4	 	   -[UIGestureRecognizer _updateGestureWithEvent:]
    192 Bytes  100.0%	4	 	    -[UIScrollView handlePan:]
    192 Bytes  100.0%	4	 	     -[UIScrollView _endPanWithEvent:]
    192 Bytes  100.0%	4	 	      -[UIScrollView(Static) _startTimer:]

Call Tree (full):
Bytes Used	# Leaks		Symbol Name
    192 Bytes  100.0%	4	 	start
    192 Bytes  100.0%	4	 	 main
    192 Bytes  100.0%	4	 	  UIApplicationMain
    192 Bytes  100.0%	4	 	   GSEventRunModal
    192 Bytes  100.0%	4	 	    CFRunLoopRunInMode
    192 Bytes  100.0%	4	 	     CFRunLoopRunSpecific
    192 Bytes  100.0%	4	 	      __CFRunLoopRun
    144 Bytes   75.0%	3	 	       __CFRunLoopDoSource1
    144 Bytes   75.0%	3	 	        __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__
    144 Bytes   75.0%	3	 	         PurpleEventCallback
    144 Bytes   75.0%	3	 	          _UIApplicationHandleEvent
    144 Bytes   75.0%	3	 	           -[UIApplication sendEvent:]
    144 Bytes   75.0%	3	 	            -[UIWindow sendEvent:]
    144 Bytes   75.0%	3	 	             -[UIWindow _sendGesturesForEvent:]
    144 Bytes   75.0%	3	 	              _UIGestureRecognizerUpdateGesturesFromSendEvent
    144 Bytes   75.0%	3	 	               _UIGestureRecognizerUpdate
    144 Bytes   75.0%	3	 	                _UIGestureRecognizerApplyBlocksToArray
    144 Bytes   75.0%	3	 	                 ___UIGestureRecognizerUpdate_block_invoke_0541
    144 Bytes   75.0%	3	 	                  -[UIGestureRecognizer _updateGestureWithEvent:]
    144 Bytes   75.0%	3	 	                   _UIGestureRecognizerSendActions
    144 Bytes   75.0%	3	 	                    -[UIScrollView handlePan:]
    144 Bytes   75.0%	3	 	                     -[UIScrollView _endPanWithEvent:]
    144 Bytes   75.0%	3	 	                      -[UIScrollView(Static) _startTimer:]
    144 Bytes   75.0%	3	 	                       CFNotificationCenterAddObserver
    144 Bytes   75.0%	3	 	                        _CFXNotificationRegisterObserver
    144 Bytes   75.0%	3	 	                         notify_register_dispatch
    144 Bytes   75.0%	3	 	                          notify_register_mach_port
    144 Bytes   75.0%	3	 	                           token_table_add
    144 Bytes   75.0%	3	 	                            strdup
    144 Bytes   75.0%	3	 	                             malloc
     48 Bytes   25.0%	1	 	       __CFRunLoopDoSources0

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!