<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.8.8: v8::RetainedObjectInfo Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">V8 API Reference Guide for node.js v0.8.8
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1_retained_object_info.html">RetainedObjectInfo</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classv8_1_1_retained_object_info-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">v8::RetainedObjectInfo Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="v8-profiler_8h_source.html">v8-profiler.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5011203f7c5949049ba36b8059f03eca"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#a5011203f7c5949049ba36b8059f03eca">Dispose</a> ()=0</td></tr>
<tr class="separator:a5011203f7c5949049ba36b8059f03eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a286103bb076c85415919c86b1838c990"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#a286103bb076c85415919c86b1838c990">IsEquivalent</a> (<a class="el" href="classv8_1_1_retained_object_info.html">RetainedObjectInfo</a> *other)=0</td></tr>
<tr class="separator:a286103bb076c85415919c86b1838c990"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fdbfa242b95615e63f08433419c8066"><td class="memItemLeft" align="right" valign="top">virtual intptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#a6fdbfa242b95615e63f08433419c8066">GetHash</a> ()=0</td></tr>
<tr class="separator:a6fdbfa242b95615e63f08433419c8066"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad19106fc7f0499fd45005077551d54c0"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#ad19106fc7f0499fd45005077551d54c0">GetLabel</a> ()=0</td></tr>
<tr class="separator:ad19106fc7f0499fd45005077551d54c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf835370c5516f2a89dd2d3f83dee10b"><td class="memItemLeft" align="right" valign="top">virtual const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#adf835370c5516f2a89dd2d3f83dee10b">GetGroupLabel</a> ()</td></tr>
<tr class="separator:adf835370c5516f2a89dd2d3f83dee10b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6865597469bc7d28bd8ec71b4b890bd"><td class="memItemLeft" align="right" valign="top">virtual intptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#ae6865597469bc7d28bd8ec71b4b890bd">GetElementCount</a> ()</td></tr>
<tr class="separator:ae6865597469bc7d28bd8ec71b4b890bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a899eed0b1f6e046edc3c7a7c08aa8c"><td class="memItemLeft" align="right" valign="top">virtual intptr_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classv8_1_1_retained_object_info.html#a1a899eed0b1f6e046edc3c7a7c08aa8c">GetSizeInBytes</a> ()</td></tr>
<tr class="separator:a1a899eed0b1f6e046edc3c7a7c08aa8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for providing information about embedder's objects held by global handles. This information is reported in two ways:</p>
<ol type="1">
<li>When calling AddObjectGroup, an embedder may pass <a class="el" href="classv8_1_1_retained_object_info.html">RetainedObjectInfo</a> instance describing the group. To collect this information while taking a heap snapshot, <a class="el" href="classv8_1_1_v8.html">V8</a> calls GC prologue and epilogue callbacks.</li>
<li>When a heap snapshot is collected, <a class="el" href="classv8_1_1_v8.html">V8</a> additionally requests RetainedObjectInfos for persistent handles that were not previously reported via AddObjectGroup.</li>
</ol>
<p>Thus, if an embedder wants to provide information about native objects for heap snapshots, he can do it in a GC prologue handler, and / or by assigning wrapper class ids in the following way:</p>
<ol type="1">
<li>Bind a callback to class id by calling DefineWrapperClass.</li>
<li>Call SetWrapperClassId on certain persistent handles.</li>
</ol>
<p><a class="el" href="classv8_1_1_v8.html">V8</a> takes ownership of <a class="el" href="classv8_1_1_retained_object_info.html">RetainedObjectInfo</a> instances passed to it and keeps them alive only during snapshot collection. Afterwards, they are freed by calling the Dispose class function. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a5011203f7c5949049ba36b8059f03eca"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void v8::RetainedObjectInfo::Dispose </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Called by <a class="el" href="classv8_1_1_v8.html">V8</a> when it no longer needs an instance. </p>

</div>
</div>
<a class="anchor" id="ae6865597469bc7d28bd8ec71b4b890bd"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetElementCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns element count in case if a global handle retains a subgraph by holding one of its nodes. </p>

</div>
</div>
<a class="anchor" id="adf835370c5516f2a89dd2d3f83dee10b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* v8::RetainedObjectInfo::GetGroupLabel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns human-readable group label. It must be a null-terminated UTF-8 encoded string. <a class="el" href="classv8_1_1_v8.html">V8</a> copies its contents during a call to GetGroupLabel. Heap snapshot generator will collect all the group names, create top level entries with these names and attach the objects to the corresponding top level group objects. There is a default implementation which is required because embedders don't have their own implementation yet. </p>

</div>
</div>
<a class="anchor" id="a6fdbfa242b95615e63f08433419c8066"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetHash </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns hash value for the instance. Equivalent instances must have the same hash value. </p>

</div>
</div>
<a class="anchor" id="ad19106fc7f0499fd45005077551d54c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual const char* v8::RetainedObjectInfo::GetLabel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns human-readable label. It must be a null-terminated UTF-8 encoded string. <a class="el" href="classv8_1_1_v8.html">V8</a> copies its contents during a call to GetLabel. </p>

</div>
</div>
<a class="anchor" id="a1a899eed0b1f6e046edc3c7a7c08aa8c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetSizeInBytes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns embedder's object size in bytes. </p>

</div>
</div>
<a class="anchor" id="a286103bb076c85415919c86b1838c990"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool v8::RetainedObjectInfo::IsEquivalent </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classv8_1_1_retained_object_info.html">RetainedObjectInfo</a> *&#160;</td>
          <td class="paramname"><em>other</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Returns whether two instances are equivalent. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="v8-profiler_8h_source.html">v8-profiler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:48:41 for V8 API Reference Guide for node.js v0.8.8 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
