Changes between Version 18 and Version 19 of Modules


Ignore:
Timestamp:
Feb 27, 2012 11:37:47 PM (9 years ago)
Author:
abarth@webkit.org
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Modules

    v18 v19  
    2121== Associating state with "core" objects ==
    2222
    23  * http://trac.webkit.org/browser/trunk/Source/WebCore/platform/Supplementable.h
     23Sometimes a module needs to associate state with a core object, such as Page or Navigator.  Typically, this state doesn't interact with any of the other state associated with this object and simply piggybacks on the lifetime of the core object.  Rather than bloating the core objects with your feature-specific state, you can associate your feature's data with the core object using [http://trac.webkit.org/browser/trunk/Source/WebCore/platform/Supplementable.h Supplementable.h].  This mechanism allocates your data lazily, which saves memory on pages that don't use your feature.
     24
     25For example, the Gampad module...
    2426
    2527== Observing the lifecycle of "core" objects ==