aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/others/irrlicht-1.8.1/doc/html/classirr_1_1_i_reference_counted.html
blob: 7fa862e07432324282e940f5979dacac5d626c07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
<!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"/>
<title>Irrlicht 3D Engine: irr::IReferenceCounted Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Irrlicht 3D Engine
   
   </div>
   
  </td>
  
  
  
   
   <td>        <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>
</td>
   
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="dynsections.js"></script>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('classirr_1_1_i_reference_counted.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">irr::IReferenceCounted Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="irr::IReferenceCounted" -->
<p>Base class of most objects of the Irrlicht Engine.  
 <a href="classirr_1_1_i_reference_counted.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for irr::IReferenceCounted:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
 <div class="center">
  <img src="classirr_1_1_i_reference_counted.png" usemap="#irr::IReferenceCounted_map" alt=""/>
  <map id="irr::IReferenceCounted_map" name="irr::IReferenceCounted_map">
<area href="classirr_1_1gui_1_1_i_cursor_control.html" title="Interface to manipulate the mouse cursor." alt="irr::gui::ICursorControl" shape="rect" coords="250,56,490,80"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_element_factory.html" title="Interface making it possible to dynamically create GUI elements." alt="irr::gui::IGUIElementFactory" shape="rect" coords="250,112,490,136"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_environment.html" title="GUI Environment. Used as factory and manager of all other GUI elements." alt="irr::gui::IGUIEnvironment" shape="rect" coords="250,168,490,192"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_font.html" title="Font interface." alt="irr::gui::IGUIFont" shape="rect" coords="250,224,490,248"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_image_list.html" title="Font interface." alt="irr::gui::IGUIImageList" shape="rect" coords="250,280,490,304"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_sprite_bank.html" title="Sprite bank interface." alt="irr::gui::IGUISpriteBank" shape="rect" coords="250,336,490,360"/>
<area href="classirr_1_1gui_1_1_i_g_u_i_tree_view_node.html" title="Node for gui tree view." alt="irr::gui::IGUITreeViewNode" shape="rect" coords="250,392,490,416"/>
<area href="classirr_1_1_i_logger.html" title="Interface for logging messages, warnings and errors." alt="irr::ILogger" shape="rect" coords="250,448,490,472"/>
<area href="classirr_1_1io_1_1_i_archive_loader.html" title="Class which is able to create an archive from a file." alt="irr::io::IArchiveLoader" shape="rect" coords="250,504,490,528"/>
<area href="classirr_1_1io_1_1_i_attribute_exchanging_object.html" title="An object which is able to serialize and deserialize its attributes into an attributes object..." alt="irr::io::IAttributeExchangingObject" shape="rect" coords="250,560,490,584"/>
<area href="classirr_1_1io_1_1_i_attributes.html" title="Provides a generic interface for attributes and their values and the possiblity to serialize them..." alt="irr::io::IAttributes" shape="rect" coords="250,616,490,640"/>
<area href="classirr_1_1io_1_1_i_file_archive.html" title="The FileArchive manages archives and provides access to files inside them." alt="irr::io::IFileArchive" shape="rect" coords="250,672,490,696"/>
<area href="classirr_1_1io_1_1_i_file_list.html" title="Provides a list of files and folders." alt="irr::io::IFileList" shape="rect" coords="250,728,490,752"/>
<area href="classirr_1_1io_1_1_i_file_system.html" title="The FileSystem manages files and archives and provides access to them." alt="irr::io::IFileSystem" shape="rect" coords="250,784,490,808"/>
<area href="classirr_1_1io_1_1_i_read_file.html" title="Interface providing read acess to a file." alt="irr::io::IReadFile" shape="rect" coords="250,840,490,864"/>
<area href="classirr_1_1io_1_1_i_write_file.html" title="Interface providing write access to a file." alt="irr::io::IWriteFile" shape="rect" coords="250,896,490,920"/>
<area href="classirr_1_1io_1_1_i_x_m_l_writer.html" title="Interface providing methods for making it easier to write XML files." alt="irr::io::IXMLWriter" shape="rect" coords="250,952,490,976"/>
<area href="classirr_1_1_i_o_s_operator.html" title="The Operating system operator provides operation system specific methods and informations." alt="irr::IOSOperator" shape="rect" coords="250,1008,490,1032"/>
<area href="classirr_1_1_i_randomizer.html" title="Interface for generating random numbers." alt="irr::IRandomizer" shape="rect" coords="250,1064,490,1088"/>
<area href="classirr_1_1_irrlicht_device.html" title="The Irrlicht device. You can create it with createDevice() or createDeviceEx()." alt="irr::IrrlichtDevice" shape="rect" coords="250,1120,490,1144"/>
<area href="classirr_1_1_i_timer.html" title="Interface for getting and manipulating the virtual time." alt="irr::ITimer" shape="rect" coords="250,1176,490,1200"/>
<area href="classirr_1_1scene_1_1_i_animation_end_call_back.html" title="Callback interface for catching events of ended animations." alt="irr::scene::IAnimationEndCallBack" shape="rect" coords="250,1232,490,1256"/>
<area href="classirr_1_1scene_1_1_i_collada_mesh_writer_names.html" title="Callback interface to use custom names on collada writing." alt="irr::scene::IColladaMeshWriterNames" shape="rect" coords="250,1288,490,1312"/>
<area href="classirr_1_1scene_1_1_i_collada_mesh_writer_properties.html" title="Callback interface for properties which can be used to influence collada writing." alt="irr::scene::IColladaMeshWriterProperties" shape="rect" coords="250,1344,490,1368"/>
<area href="classirr_1_1scene_1_1_i_collision_callback.html" title="Callback interface for catching events of collisions." alt="irr::scene::ICollisionCallback" shape="rect" coords="250,1400,490,1424"/>
<area href="classirr_1_1scene_1_1_i_geometry_creator.html" title="Helper class for creating geometry on the fly." alt="irr::scene::IGeometryCreator" shape="rect" coords="250,1456,490,1480"/>
<area href="classirr_1_1scene_1_1_i_index_buffer.html" alt="irr::scene::IIndexBuffer" shape="rect" coords="250,1512,490,1536"/>
<area href="classirr_1_1scene_1_1_i_light_manager.html" title="ILightManager provides an interface for user applications to manipulate the list of lights in the sce..." alt="irr::scene::ILightManager" shape="rect" coords="250,1568,490,1592"/>
<area href="classirr_1_1scene_1_1_i_mesh.html" title="Class which holds the geometry of an object." alt="irr::scene::IMesh" shape="rect" coords="250,1624,490,1648"/>
<area href="classirr_1_1scene_1_1_i_mesh_buffer.html" title="Struct for holding a mesh with a single material." alt="irr::scene::IMeshBuffer" shape="rect" coords="250,1680,490,1704"/>
<area href="classirr_1_1scene_1_1_i_mesh_cache.html" title="The mesh cache stores already loaded meshes and provides an interface to them." alt="irr::scene::IMeshCache" shape="rect" coords="250,1736,490,1760"/>
<area href="classirr_1_1scene_1_1_i_mesh_loader.html" title="Class which is able to load an animated mesh from a file." alt="irr::scene::IMeshLoader" shape="rect" coords="250,1792,490,1816"/>
<area href="classirr_1_1scene_1_1_i_mesh_manipulator.html" title="An interface for easy manipulation of meshes." alt="irr::scene::IMeshManipulator" shape="rect" coords="250,1848,490,1872"/>
<area href="classirr_1_1scene_1_1_i_mesh_writer.html" title="Interface for writing meshes." alt="irr::scene::IMeshWriter" shape="rect" coords="250,1904,490,1928"/>
<area href="classirr_1_1scene_1_1_i_scene_collision_manager.html" title="The Scene Collision Manager provides methods for performing collision tests and picking on scene node..." alt="irr::scene::ISceneCollisionManager" shape="rect" coords="250,1960,490,1984"/>
<area href="classirr_1_1scene_1_1_i_scene_loader.html" title="Class which can load a scene into the scene manager." alt="irr::scene::ISceneLoader" shape="rect" coords="250,2016,490,2040"/>
<area href="classirr_1_1scene_1_1_i_scene_manager.html" title="The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff." alt="irr::scene::ISceneManager" shape="rect" coords="250,2072,490,2096"/>
<area href="classirr_1_1scene_1_1_i_scene_node_animator_factory.html" title="Interface for dynamic creation of scene node animators." alt="irr::scene::ISceneNodeAnimatorFactory" shape="rect" coords="250,2128,490,2152"/>
<area href="classirr_1_1scene_1_1_i_scene_node_factory.html" title="Interface for dynamic creation of scene nodes." alt="irr::scene::ISceneNodeFactory" shape="rect" coords="250,2184,490,2208"/>
<area href="classirr_1_1scene_1_1_i_triangle_selector.html" title="Interface to return triangles with specific properties." alt="irr::scene::ITriangleSelector" shape="rect" coords="250,2240,490,2264"/>
<area href="classirr_1_1scene_1_1_i_vertex_buffer.html" alt="irr::scene::IVertexBuffer" shape="rect" coords="250,2296,490,2320"/>
<area href="classirr_1_1scene_1_1quake3_1_1_i_shader_manager.html" title="Manages various Quake3 Shader Styles." alt="irr::scene::quake3::IShaderManager" shape="rect" coords="250,2352,490,2376"/>
<area href="structirr_1_1scene_1_1quake3_1_1_s_var_group_list.html" title="holding a group a variable" alt="irr::scene::quake3::SVarGroupList" shape="rect" coords="250,2408,490,2432"/>
<area href="structirr_1_1scene_1_1_s_m_d3_mesh.html" title="Holding Frames Buffers and Tag Infos." alt="irr::scene::SMD3Mesh" shape="rect" coords="250,2464,490,2488"/>
<area href="structirr_1_1scene_1_1_s_m_d3_mesh_buffer.html" title="Holding Frame Data for a Mesh." alt="irr::scene::SMD3MeshBuffer" shape="rect" coords="250,2520,490,2544"/>
<area href="classirr_1_1video_1_1_i_image.html" title="Interface for software image data." alt="irr::video::IImage" shape="rect" coords="250,2576,490,2600"/>
<area href="classirr_1_1video_1_1_i_image_loader.html" title="Class which is able to create a image from a file." alt="irr::video::IImageLoader" shape="rect" coords="250,2632,490,2656"/>
<area href="classirr_1_1video_1_1_i_image_writer.html" title="Interface for writing software image data." alt="irr::video::IImageWriter" shape="rect" coords="250,2688,490,2712"/>
<area href="classirr_1_1video_1_1_i_material_renderer.html" title="Interface for material rendering." alt="irr::video::IMaterialRenderer" shape="rect" coords="250,2744,490,2768"/>
<area href="classirr_1_1video_1_1_i_shader_constant_set_call_back.html" title="Interface making it possible to set constants for gpu programs every frame." alt="irr::video::IShaderConstantSetCallBack" shape="rect" coords="250,2800,490,2824"/>
<area href="classirr_1_1video_1_1_i_texture.html" title="Interface of a Video Driver dependent Texture." alt="irr::video::ITexture" shape="rect" coords="250,2856,490,2880"/>
<area href="classirr_1_1video_1_1_i_video_driver.html" title="Interface to driver which is able to perform 2d and 3d graphics functions." alt="irr::video::IVideoDriver" shape="rect" coords="250,2912,490,2936"/>
<area href="classirr_1_1video_1_1_i_video_mode_list.html" title="A list of all available video modes." alt="irr::video::IVideoModeList" shape="rect" coords="250,2968,490,2992"/>
</map>
 </div></div>

<p><a href="classirr_1_1_i_reference_counted-members.html">List of all members.</a></p>
<h2><a name="pub-methods"></a>
Public Member Functions</h2>
<ul>
<li><a class="el" href="classirr_1_1_i_reference_counted.html#a8411682018e68a2752d4c82675c71040">IReferenceCounted</a> ()
<dl class="el"><dd class="mdescRight">Constructor.  <a href="#a8411682018e68a2752d4c82675c71040"></a><br/></dl><li>virtual <a class="el" href="classirr_1_1_i_reference_counted.html#a78abc75801cbb13d9db0955b3c07251c">~IReferenceCounted</a> ()
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#a78abc75801cbb13d9db0955b3c07251c"></a><br/></dl><li>bool <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a">drop</a> () const 
<dl class="el"><dd class="mdescRight">Drops the object. Decrements the reference counter by one.  <a href="#afb169a857e0d2cdb96b8821cb9bff17a"></a><br/></dl><li>const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> * <a class="el" href="classirr_1_1_i_reference_counted.html#a768e697e55d496e396b3acc5003d2bea">getDebugName</a> () const 
<dl class="el"><dd class="mdescRight">Returns the debug name of the object.  <a href="#a768e697e55d496e396b3acc5003d2bea"></a><br/></dl><li><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> <a class="el" href="classirr_1_1_i_reference_counted.html#a198560456588db46331f06eda909a399">getReferenceCount</a> () const 
<dl class="el"><dd class="mdescRight">Get the reference count.  <a href="#a198560456588db46331f06eda909a399"></a><br/></dl><li>void <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4">grab</a> () const 
<dl class="el"><dd class="mdescRight">Grabs the object. Increments the reference counter by one.  <a href="#a2b7a035532e5f409ca9482dab79185f4"></a><br/></dl></ul>
<h2><a name="pro-methods"></a>
Protected Member Functions</h2>
<ul>
<li>void <a class="el" href="classirr_1_1_i_reference_counted.html#a704c5042d399fe8cd3bdd65a0559002a">setDebugName</a> (const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *newName)
<dl class="el"><dd class="mdescRight">Sets the debug name of the object.  <a href="#a704c5042d399fe8cd3bdd65a0559002a"></a><br/></dl></ul>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Base class of most objects of the Irrlicht Engine. </p>
<p>This class provides reference counting through the methods <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. It also is able to store a debug string for every instance of an object. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.</p>
<p>When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.</p>
<p>A simple example:</p>
<p>If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>.</p>
<p>If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. </p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00041">41</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a8411682018e68a2752d4c82675c71040"></a><!-- doxytag: member="irr::IReferenceCounted::IReferenceCounted" ref="a8411682018e68a2752d4c82675c71040" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">irr::IReferenceCounted::IReferenceCounted </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Constructor. </p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00046">46</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

</div>
</div>
<a class="anchor" id="a78abc75801cbb13d9db0955b3c07251c"></a><!-- doxytag: member="irr::IReferenceCounted::~IReferenceCounted" ref="a78abc75801cbb13d9db0955b3c07251c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual irr::IReferenceCounted::~IReferenceCounted </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00052">52</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afb169a857e0d2cdb96b8821cb9bff17a"></a><!-- doxytag: member="irr::IReferenceCounted::drop" ref="afb169a857e0d2cdb96b8821cb9bff17a" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool irr::IReferenceCounted::drop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Drops the object. Decrements the reference counter by one. </p>
<p>The <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a> class provides a basic reference counting mechanism with its methods <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.</p>
<p>When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.</p>
<p>A simple example:</p>
<p>If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>True, if the object was deleted. </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00116">116</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

<p>References <a class="el" href="irr_types_8h_source.html#l00178">_IRR_DEBUG_BREAK_IF</a>.</p>

<p>Referenced by <a class="el" href="_s_mesh_8h_source.html#l00037">irr::scene::SMesh::clear()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00757">irr::scene::ISceneNode::cloneMembers()</a>, <a class="el" href="_i_q3_shader_8h_source.html#l00770">irr::scene::quake3::getTextures()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00378">irr::scene::IColladaMeshWriter::setDefaultNameGenerator()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00366">irr::scene::IColladaMeshWriter::setDefaultProperties()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h_source.html#l00057">irr::scene::CDynamicMeshBuffer::setIndexBuffer()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00335">irr::scene::IColladaMeshWriter::setNameGenerator()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00596">irr::scene::ISceneNode::setParent()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00310">irr::scene::IColladaMeshWriter::setProperties()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00635">irr::scene::ISceneNode::setTriangleSelector()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h_source.html#l00047">irr::scene::CDynamicMeshBuffer::setVertexBuffer()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h_source.html#l00029">irr::scene::CDynamicMeshBuffer::~CDynamicMeshBuffer()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00214">irr::scene::IColladaMeshWriter::~IColladaMeshWriter()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00062">irr::scene::ISceneNode::~ISceneNode()</a>, <a class="el" href="_s_animated_mesh_8h_source.html#l00032">irr::scene::SAnimatedMesh::~SAnimatedMesh()</a>, <a class="el" href="_i_animated_mesh_m_d3_8h_source.html#l00272">irr::scene::SMD3Mesh::~SMD3Mesh()</a>, and <a class="el" href="_s_mesh_8h_source.html#l00029">irr::scene::SMesh::~SMesh()</a>.</p>

</div>
</div>
<a class="anchor" id="a768e697e55d496e396b3acc5003d2bea"></a><!-- doxytag: member="irr::IReferenceCounted::getDebugName" ref="a768e697e55d496e396b3acc5003d2bea" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a>* irr::IReferenceCounted::getDebugName </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the debug name of the object. </p>
<p>The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a string, previously set by <a class="el" href="classirr_1_1_i_reference_counted.html#a704c5042d399fe8cd3bdd65a0559002a" title="Sets the debug name of the object.">setDebugName()</a>; </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00142">142</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

</div>
</div>
<a class="anchor" id="a198560456588db46331f06eda909a399"></a><!-- doxytag: member="irr::IReferenceCounted::getReferenceCount" ref="a198560456588db46331f06eda909a399" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6">s32</a> irr::IReferenceCounted::getReferenceCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the reference count. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Current value of the reference counter. </dd></dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00133">133</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2b7a035532e5f409ca9482dab79185f4"></a><!-- doxytag: member="irr::IReferenceCounted::grab" ref="a2b7a035532e5f409ca9482dab79185f4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::IReferenceCounted::grab </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Grabs the object. Increments the reference counter by one. </p>
<p>Someone who calls <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> to an object, should later also call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to it. If an object never gets as much <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> as <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> calls, it will never be destroyed. The <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a> class provides a basic reference counting mechanism with its methods <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> and <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. Most objects of the Irrlicht Engine are derived from <a class="el" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a>, and so they are reference counted.</p>
<p>When you create an object in the Irrlicht engine, calling a method which starts with 'create', an object is created, and you get a pointer to the new object. If you no longer need the object, you have to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. This will destroy the object, if <a class="el" href="classirr_1_1_i_reference_counted.html#a2b7a035532e5f409ca9482dab79185f4" title="Grabs the object. Increments the reference counter by one.">grab()</a> was not called in another part of you program, because this part still needs the object. Note, that you only need to call <a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a> to the object, if you created it, and the method had a 'create' in it.</p>
<p>A simple example:</p>
<p>If you want to create a texture, you may want to call an imaginable method IDriver::createTexture. You call ITexture* texture = driver-&gt;createTexture(dimension2d&lt;u32&gt;(128, 128)); If you no longer need the texture, call texture-&gt;<a class="el" href="classirr_1_1_i_reference_counted.html#afb169a857e0d2cdb96b8821cb9bff17a" title="Drops the object. Decrements the reference counter by one.">drop()</a>. If you want to load a texture, you may want to call imaginable method IDriver::loadTexture. You do this like ITexture* texture = driver-&gt;loadTexture("example.jpg"); You will not have to drop the pointer to the loaded texture, because the name of the method does not start with 'create'. The texture is stored somewhere by the driver. </p>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00086">86</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

<p>Referenced by <a class="el" href="_i_scene_node_8h_source.html#l00348">irr::scene::ISceneNode::addAnimator()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00280">irr::scene::ISceneNode::addChild()</a>, <a class="el" href="_i_g_u_i_element_8h_source.html#l00818">irr::gui::IGUIElement::addChildToEnd()</a>, <a class="el" href="_s_animated_mesh_8h_source.html#l00078">irr::scene::SAnimatedMesh::addMesh()</a>, <a class="el" href="_s_mesh_8h_source.html#l00098">irr::scene::SMesh::addMeshBuffer()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00378">irr::scene::IColladaMeshWriter::setDefaultNameGenerator()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00366">irr::scene::IColladaMeshWriter::setDefaultProperties()</a>, <a class="el" href="_c_dynamic_mesh_buffer_8h_source.html#l00057">irr::scene::CDynamicMeshBuffer::setIndexBuffer()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00335">irr::scene::IColladaMeshWriter::setNameGenerator()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00596">irr::scene::ISceneNode::setParent()</a>, <a class="el" href="_i_collada_mesh_writer_8h_source.html#l00310">irr::scene::IColladaMeshWriter::setProperties()</a>, <a class="el" href="_i_scene_node_8h_source.html#l00635">irr::scene::ISceneNode::setTriangleSelector()</a>, and <a class="el" href="_c_dynamic_mesh_buffer_8h_source.html#l00047">irr::scene::CDynamicMeshBuffer::setVertexBuffer()</a>.</p>

</div>
</div>
<a class="anchor" id="a704c5042d399fe8cd3bdd65a0559002a"></a><!-- doxytag: member="irr::IReferenceCounted::setDebugName" ref="a704c5042d399fe8cd3bdd65a0559002a" args="(const c8 *newName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void irr::IReferenceCounted::setDebugName </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceirr.html#a9395eaea339bcb546b319e9c96bf7410">c8</a> *&#160;</td>
          <td class="paramname"><em>newName</em></td><td>)</td>
          <td><code> [inline, protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the debug name of the object. </p>
<p>The Debugname may only be set and changed by the object itself. This method should only be used in Debug mode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">newName,:</td><td>New debug name to set. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_i_reference_counted_8h_source.html#l00153">153</a> of file <a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a>.</p>

<p>Referenced by <a class="el" href="_c_mesh_buffer_8h_source.html#l00021">irr::scene::CMeshBuffer&lt; T &gt;::CMeshBuffer()</a>, <a class="el" href="_i_g_u_i_element_8h_source.html#l00030">irr::gui::IGUIElement::IGUIElement()</a>, <a class="el" href="_s_animated_mesh_8h_source.html#l00022">irr::scene::SAnimatedMesh::SAnimatedMesh()</a>, <a class="el" href="_s_mesh_8h_source.html#l00021">irr::scene::SMesh::SMesh()</a>, <a class="el" href="_s_shared_mesh_buffer_8h_source.html#l00019">irr::scene::SSharedMeshBuffer::SSharedMeshBuffer()</a>, and <a class="el" href="_s_skin_mesh_buffer_8h_source.html#l00022">irr::scene::SSkinMeshBuffer::SSkinMeshBuffer()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="_i_reference_counted_8h_source.html">IReferenceCounted.h</a></li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceirr.html">irr</a>      </li>
      <li class="navelem"><a class="el" href="classirr_1_1_i_reference_counted.html">IReferenceCounted</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></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>


    <li class="footer">
<a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht 
Engine</a> Documentation &copy; 2003-2012 by Nikolaus Gebhardt. Generated on Sun Nov 17 2013 20:18:43 for Irrlicht 3D Engine by
<a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>