Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-14490

iOS: iPad popover view memory leak when opening/closing popover

    Details

      Description

      Application live memory is getting increased whenever we open the popover view in iPad.

      Test Case:

      1: Use the below mentioned code.
      2: Put it on app.js file of any new project.
      3: Run the application and use instrument to analyze the application for leaks.
      4: Keep on doing open and hide of pop over view and check the live bites.
      5: live bites go on increasing.

      Sample code

      var window = Ti.UI.createWindow();
      var openButton = Titanium.UI.createButton({title:'Open'});
       
      window.add(openButton);
       
      openButton.addEventListener('click', function (e) {
       
          var closeButton = Titanium.UI.createButton({title:'Cancel'});
          var popover = Ti.UI.iPad.createPopover({ height:300, width:300,
              title:'Add a Walk In', leftNavButton:closeButton});
          var tabbedBar = Titanium.UI.iOS.createTabbedBar({
              labels:['One', 'Two', 'Three'],
              backgroundColor:'#336699',
              top:50,
              style:Titanium.UI.iPhone.SystemButtonStyle.BAR,
              height:25,
              width:200
          });
          popover.add(tabbedBar);
       
          popover.show({
              view:openButton, animated:true
          });
       
          closeButton.addEventListener('click', function (e) {
              tabbedBar.hide();
              popover.remove(tabbedBar);
              tabbedBar = null;
              popover.hide();
              popover = null;
          });
       
      });
       
      window.open();
      
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                anigam Ashish Nigam
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-16938
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code