This file is indexed.

/usr/share/GNUstep/Documentation/Developer/BaseAdditions/Reference/NSObject+GNUstepBase.html is in gnustep-base-doc 1.25.1-2ubuntu3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>NSObject+GNUstepBase documentation</title>
  </head>
  <body>
    <font face="serif">
    <a href="BaseAdditions.html">Up</a>
    <br />
    <h1><a name="title$NSObject+GNUstepBase">NSObject+GNUstepBase documentation</a></h1>
    <h3>Authors</h3>
    <dl>
      <dt>Richard Frith-Macdonald (<a href="mailto:rfm@gnu.org"><code>rfm@gnu.org</code></a>)</dt>
      <dd>
      </dd>
    </dl>
    <p><b>Copyright:</b> (C) 2003-2010 Free Software Foundation, Inc.</p>

        <div>
      <hr width="50%" align="left" />
      <h3>Contents -</h3>
      <ol>
        <li>
          <a href="#001000000000">Software documentation for the NSObject(GNUstepBase)
        informal protocol</a>
        </li>
        <li>
          <a href="#002000000000">Software documentation for the NSObject(GSAtExit)
        informal protocol</a>
        </li>
        <li>
          <a href="#003000000000">Software documentation for the NSObject(GSCleanup)
        informal protocol</a>
        </li>
        <li>
          <a href="#004000000000">Software documentation for the
        NSObject(MemoryFootprint) informal
        protocol</a>
        </li>
      </ol>
      <hr width="50%" align="left" />
    </div>

          <h1><a name="001000000000">
        Software documentation for the NSObject(GNUstepBase)
        informal protocol
      </a></h1>
    <h2>NSObject(<a name="category$NSObject(GNUstepBase)">GNUstepBase</a>)</h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>GNUstepBase/NSObject+GNUstepBase.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
          <em>Description forthcoming.</em>
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-compare$">-compare:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-isInstance">-isInstance</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-makeImmutable">-makeImmutable</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-makeImmutableCopyOnFail$">-makeImmutableCopyOnFail:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-notImplemented$">-notImplemented:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-shouldNotImplement$">-shouldNotImplement:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GNUstepBase)-subclassResponsibility$">-subclassResponsibility:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-compare$">compare:&nbsp;</a></h3>
    - (NSComparisonResult) <b>compare:</b> (id)anObject;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            WARNING: The
            <a rel="gsdoc" href="#method$NSObject(GNUstepBase)-compare$">
              -compare:
            </a>

            method for NSObject is deprecated due to subclasses
            declaring the same selector with conflicting
            signatures. Comparision of arbitrary objects is
            not just meaningless but also dangerous as most
            concrete implementations expect comparable objects
            as arguments often accessing instance variables
            directly. This method will be removed in a future
            release.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-isInstance">isInstance&nbsp;</a></h3>
    - (BOOL) <b>isInstance</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            For backward compatibility only... use
            
              class_isMetaClass()
            

            on the class of the receiver instead.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-makeImmutable">makeImmutable&nbsp;</a></h3>
    - (BOOL) <b>makeImmutable</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Transmutes the receiver into an immutable
            version of the same object. Returns
            <code>YES</code> if the receiver has become
            immutable, <code>NO</code> otherwise. <br /> The
            default implementation returns <code>NO</code>.
            <br /> Mutable classes which have an immutable
            counterpart they can efficiently change into,
            should override to transmute themselves and return
            <code>YES</code>. <br /> Immutable classes should
            override this to simply return <code>YES</code>
            with no further action. <br /> This method is used in
            methods which are declared to return immutable
            objects (eg. an NSArray), but which create and
            build mutable ones internally.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-makeImmutableCopyOnFail$">makeImmutableCopyOnFail:&nbsp;</a></h3>
    - (id) <b>makeImmutableCopyOnFail:</b> (BOOL)force;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            DEPRECATED... do not use. Transmutes the
            receiver into an immutable version of the same
            object and returns the result. <br /> If the
            receiver is not a mutable object or cannot be
            simply transmuted, then this method either returns
            the receiver unchanged or, if the <var>force</var> flag
            is set to <code>YES</code>, returns an autoreleased copy
            of the receiver. <br /> Mutable classes should override
            this default implementation. <br /> This method is
            used in methods which are declared to return immutable
            objects (eg. an NSArray), but which create and
            build mutable ones internally.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-notImplemented$">notImplemented:&nbsp;</a></h3>
    - (id) <b>notImplemented:</b> (SEL)aSel;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Message sent when an implementation wants to
            explicitly exclude a method (but cannot due to
            compiler constraint), and wants to make sure it is
            not called by mistake. Default implementation raises an
            exception at runtime.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-shouldNotImplement$">shouldNotImplement:&nbsp;</a></h3>
    - (id) <b>shouldNotImplement:</b> (SEL)aSel;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Message sent when an implementation wants to
            explicitly exclude a method (but cannot due to
            compiler constraint) and forbid that subclasses
            implement it. Default implementation raises an
            exception at runtime. If a subclass <em>does</em>
            implement this method, however, the superclass&apos;s
            implementation will not be called, so this
            is not a perfect mechanism.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GNUstepBase)-subclassResponsibility$">subclassResponsibility:&nbsp;</a></h3>
    - (id) <b>subclassResponsibility:</b> (SEL)aSel;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Message sent when an implementation wants to
            explicitly require a subclass to implement a
            method (but cannot at compile time since there is no
            <code>abstract</code> keyword in Objective-C).
            Default implementation raises an exception at
            runtime to alert developer that he/she forgot to
            override a method.
          
    </div>
    <hr width="25%" align="left" />
</div>

          <h1><a name="002000000000">
        Software documentation for the NSObject(GSAtExit)
        informal protocol
      </a></h1>
    <h2>NSObject(<a name="category$NSObject(GSAtExit)">GSAtExit</a>)</h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>GNUstepBase/NSObject+GNUstepBase.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
          This is an informal protocol... classes may implement
          the method and register themselves to have it called on
          process exit.
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSAtExit)+atExit">+atExit</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSObject(GSAtExit)+atExit">atExit&nbsp;</a></h3>
    + (void) <b>atExit</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            This method is called on exit for any class which
            implements it and which has called
            <a rel="gsdoc" href="#method$NSObject(GSCleanup)+registerAtExit">
              +registerAtExit
            </a>

            to register it to be called. <br /> The order in which
            methods for different classes is called is the
            reverse of the order in which the classes were
            registered, but it&apos;s best to assume the method
            can not depend on any other class being in a usable
            state at the point when the method is called (rather
            like +load). <br /> Typical use would be to release
            memory occupied by class data structures so that
            memory usage analysis software will not think the
            memory has been leaked.
          
    </div>
    <hr width="25%" align="left" />
</div>

          <h1><a name="003000000000">
        Software documentation for the NSObject(GSCleanup)
        informal protocol
      </a></h1>
    <h2>NSObject(<a name="category$NSObject(GSCleanup)">GSCleanup</a>)</h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>GNUstepBase/NSObject+GNUstepBase.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
          Category for methods handling leaked memory cleanup
          on exit of process (for use when debugging memory leaks).
          <br /> You enable this by calling the
          <a rel="gsdoc" href="#method$NSObject(GSCleanup)+setShouldCleanUp$">
            +setShouldCleanUp:
          </a>

          method (done implicitly by gnustep-base if the
          GNUSTEP_SHOULD_CLEAN_UP environment
          variable is set to <code>YES</code>). <br /> Your
          class then has two options for performing cleanup when
          the process ends:
          
    </p>
    <p>

            1. Use the <a rel="gsdoc" href="#method$NSObject(GSCleanup)+leak$">+leak:</a>

            method to register objects which are simply to be
            retained until the process ends, and then either
            ignored or released depending on the cleanup
            setting in force. This mechanism is simple and
            should be sufficient for many classes.
              </p>
    <p>
      
          
    </p>
    <p>

            2. Implement a
            <a rel="gsdoc" href="#method$NSObject(GSAtExit)+atExit">
              +atExit
            </a>

            method to be run when the process ends and, within
            your
            
              +initialize
            

            implementation, call
            <a rel="gsdoc" href="#method$NSObject(GSCleanup)+shouldCleanUp">
              +shouldCleanUp
            </a>

            to determine whether cleanup should be done, and if it
            returns <code>YES</code> then call
            <a rel="gsdoc" href="#method$NSObject(GSCleanup)+registerAtExit">
              +registerAtExit
            </a>

            to have your
            <a rel="gsdoc" href="#method$NSObject(GSAtExit)+atExit">
              +atExit
            </a>

            method called when the process terminates.
              </p>
    <p>
      
          
    </p>
    <p>

            The order in which &apos;leaked&apos; objects are released and
            <a rel="gsdoc" href="#method$NSObject(GSAtExit)+atExit">
              +atExit
            </a>

            methods are called on process exist is the reverse
            of the order in which they werse set up suing this API.
              </p>
    <p>
      
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+leak$">+leak:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+leakAt$">+leakAt:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+registerAtExit">+registerAtExit</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+registerAtExit$">+registerAtExit:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+setShouldCleanUp$">+setShouldCleanUp:</a></li>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(GSCleanup)+shouldCleanUp">+shouldCleanUp</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+leak$">leak:&nbsp;</a></h3>
    + (id) <b>leak:</b> (id)anObject;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            This method simply retains its argument so that it
            will never be deallocated during normal operation, but
            keeps track of it so that it is released during
            process exit if cleanup is enabled. <br /> Returns
            its argument.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+leakAt$">leakAt:&nbsp;</a></h3>
    + (id) <b>leakAt:</b> (id*)anAddress;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            This method retains the object at *anAddress so that
            it will never be deallocated during normal operation,
            but keeps track of the address so that the object is
            released and the address is zeroed during process
            exit if cleanup is enabled. <br /> Returns the object
            at *anAddress.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+registerAtExit">registerAtExit&nbsp;</a></h3>
    + (BOOL) <b>registerAtExit</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Sets the receiver to have its
            <a rel="gsdoc" href="#method$NSObject(GSAtExit)+atExit">
              +atExit
            </a>

            method called at the point when the process
            terminates. <br /> Returns <code>YES</code> on
            success and <code>NO</code> on failure (if the
            class does not implement the method or if it is
            already registered to call it). <br /> Implemented
            as a call to
            <a rel="gsdoc" href="#method$NSObject(GSCleanup)+registerAtExit$">
              +registerAtExit:
            </a>

            with the selector for the
            <a rel="gsdoc" href="#method$NSObject(GSAtExit)+atExit">
              +atExit
            </a>

            method as its argument.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+registerAtExit$">registerAtExit:&nbsp;</a></h3>
    + (BOOL) <b>registerAtExit:</b> (SEL)aSelector;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Sets the receiver to have the specified method called
            at the point when the process terminates. <br /> Returns
            <code>YES</code> on success and <code>NO</code> on
            failure (if the class does not implement the method
            ir if it is already registered to call it).
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+setShouldCleanUp$">setShouldCleanUp:&nbsp;</a></h3>
    + (void) <b>setShouldCleanUp:</b> (BOOL)aFlag;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Specifies the default cleanup behavior on process
            exit... the value returned by the NSObject
            implementation of the
            
              +shouldClanUp
            

            method. <br /> Calling this method with a
            <code>YES</code> argument implicitly calls the
            
              +enableAtExit
            

            method as well. <br /> The GNUstep Base library
            calls this method with the value obtained from the
            GNUSTEP_SHOULD_CLEAN_UP environment
            variable when NSObject is initialised.
          
    </div>
    <hr width="25%" align="left" />
</div>
<div class="method">
    <h3><a name="method$NSObject(GSCleanup)+shouldCleanUp">shouldCleanUp&nbsp;</a></h3>
    + (BOOL) <b>shouldCleanUp</b>;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            Returns a flag indicating whether the receiver
            should clean up its data structures etc at process
            exit. <br /> The NSObject implementation returns the
            value set by the
            <a rel="gsdoc" href="#method$NSObject(GSCleanup)+setShouldCleanUp$">
              +setShouldCleanUp:
            </a>

            method but subclasses may override this.
          
    </div>
    <hr width="25%" align="left" />
</div>

          <h1><a name="004000000000">
        Software documentation for the
        NSObject(MemoryFootprint) informal
        protocol
      </a></h1>
    <h2>NSObject(<a name="category$NSObject(MemoryFootprint)">MemoryFootprint</a>)</h2>
    <blockquote class="declared">
      <dl>
        <dt><b>Declared in:</b></dt>
        <dd>GNUstepBase/NSObject+GNUstepBase.h</dd>
      </dl>
    </blockquote>
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
          This is an informal protocol... classes may implement
          the method to report how much memory is used by the
          instance and any objects it acts as a container for.
        
    </div>
    <b>Method summary</b>
    <ul>
      <li><a rel="gsdoc" href="NSObject+GNUstepBase.html#method$NSObject(MemoryFootprint)-sizeInBytesExcluding$">-sizeInBytesExcluding:</a></li>
    </ul>
    <hr width="50%" align="left" />
<div class="method">
    <h3><a name="method$NSObject(MemoryFootprint)-sizeInBytesExcluding$">sizeInBytesExcluding:&nbsp;</a></h3>
    - (<a rel="gsdoc" href="TypesAndConstants.html#type$NSUInteger">NSUInteger</a>) <b>sizeInBytesExcluding:</b> (NSHashTable*)exclude;<br />
    <div class="availability">
<b>Availability:</b> Not in OpenStep/MacOS-X</div>
<br />
    <div class="desc">
      
            <em>Description forthcoming.</em>
          
    </div>
    <hr width="25%" align="left" />
</div>
    <br />
    <a href="BaseAdditions.html">Up</a>
    </font>
</body>
</html>