~canonical-platform-qa/ubuntu-ui-toolkit/fix1361750-textfield_logs

« back to all changes in this revision

Viewing changes to modules/Ubuntu/Components/PageWrapperUtils.js

  • Committer: Tarmac
  • Author(s): Tim Peeters
  • Date: 2014-08-26 14:42:58 UTC
  • mfrom: (1160.1.53 10-headAnimate)
  • Revision ID: tarmac-20140826144258-eb9a1bhja0jbzl6a
Add header animations.

Approved by PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
 */
102
102
function destroyObject(pageWrapper) {
103
103
    if (pageWrapper.canDestroy) {
104
 
        pageWrapper.object.destroy();
105
104
        pageWrapper.object = null;
 
105
        // Rely on garbage collector to destroy the object after all
 
106
        // (other) references are gone. PageHeadStyle uses actions etc.
 
107
        // of the page to show a fade-out animation after it was popped.
106
108
        pageWrapper.canDestroy = false;
107
109
    }
108
110
}