android_webview/docs/lifetime-annotations.md
As part of the WebView Multi-profile project, classes and state in `//android_webview/`` will be annotated to make their lifetimes explicit. There are broadly 5 different lifetimes that a class can have:
There is a many to one relationship between WebViews and Profiles. A single Profile can support multiple WebViews, each WebView will only have a single (constant) Profile.
These annotations are purely for documentation, there is no static analysis to check them.
In Java, use the following annotations:
@Lifetime.Singleton@Lifetime.Profile@Lifetime.WebView@Lifetime.Temporary@Lifetime.RendererIn C++, use the following comment format as the last line of the class documentation:
// Lifetime: Singleton
// Lifetime: Profile
// Lifetime: WebView
// Lifetime: Temporary
// Lifetime: Renderer