~ubuntu-branches/ubuntu/maverick/gdk-pixbuf/maverick

« back to all changes in this revision

Viewing changes to doc/html/gdk-pixbuf-refcounting.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-07-23 11:26:25 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100723112625-owhl395g8ifk2wtn
Tags: 2.21.6-2ubuntu1
* Rebase on Debian
* debian/control, debian/gir1.0-gdkpixbuf-2.0.install, debian/rules:
  - build a gir1.0-gdkpixbuf-2.0 gir binary

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<HTML
2
 
><HEAD
3
 
><TITLE
4
 
>Reference Counting and Memory Mangement</TITLE
5
 
><META
6
 
NAME="GENERATOR"
7
 
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
8
 
"><LINK
9
 
REL="HOME"
10
 
TITLE="The gdk-pixbuf Library"
11
 
HREF="index.html"><LINK
12
 
REL="UP"
13
 
TITLE="API Reference"
14
 
HREF="r27.html"><LINK
15
 
REL="PREVIOUS"
16
 
TITLE="The GdkPixbuf Structure"
17
 
HREF="gdk-pixbuf-gdk-pixbuf.html"><LINK
18
 
REL="NEXT"
19
 
TITLE="File Loading"
20
 
HREF="gdk-pixbuf-file-loading.html"></HEAD
21
 
><BODY
22
 
CLASS="REFENTRY"
23
 
BGCOLOR="#FFFFFF"
24
 
TEXT="#000000"
25
 
LINK="#0000FF"
26
 
VLINK="#840084"
27
 
ALINK="#0000FF"
28
 
><DIV
29
 
CLASS="NAVHEADER"
30
 
><TABLE
31
 
WIDTH="100%"
32
 
BORDER="0"
33
 
BGCOLOR="#000000"
34
 
CELLPADDING="1"
35
 
CELLSPACING="0"
36
 
><TR
37
 
><TH
38
 
COLSPAN="4"
39
 
ALIGN="center"
40
 
><FONT
41
 
COLOR="#FFFFFF"
42
 
SIZE="5"
43
 
>The <SPAN
44
 
CLASS="APPLICATION"
45
 
>gdk-pixbuf</SPAN
46
 
> Library</FONT
47
 
></TH
48
 
></TR
49
 
><TR
50
 
><TD
51
 
WIDTH="25%"
52
 
BGCOLOR="#C00000"
53
 
ALIGN="left"
54
 
><A
55
 
HREF="gdk-pixbuf-gdk-pixbuf.html"
56
 
><FONT
57
 
COLOR="#FFFFFF"
58
 
SIZE="3"
59
 
><B
60
 
>&#60;&#60;&#60; Previous Page</B
61
 
></FONT
62
 
></A
63
 
></TD
64
 
><TD
65
 
WIDTH="25%"
66
 
BGCOLOR="#0000C0"
67
 
ALIGN="center"
68
 
><FONT
69
 
COLOR="#FFFFFF"
70
 
SIZE="3"
71
 
><B
72
 
><A
73
 
HREF="index.html"
74
 
><FONT
75
 
COLOR="#FFFFFF"
76
 
SIZE="3"
77
 
><B
78
 
>Home</B
79
 
></FONT
80
 
></A
81
 
></B
82
 
></FONT
83
 
></TD
84
 
><TD
85
 
WIDTH="25%"
86
 
BGCOLOR="#00C000"
87
 
ALIGN="center"
88
 
><FONT
89
 
COLOR="#FFFFFF"
90
 
SIZE="3"
91
 
><B
92
 
><A
93
 
HREF="r27.html"
94
 
><FONT
95
 
COLOR="#FFFFFF"
96
 
SIZE="3"
97
 
><B
98
 
>Up</B
99
 
></FONT
100
 
></A
101
 
></B
102
 
></FONT
103
 
></TD
104
 
><TD
105
 
WIDTH="25%"
106
 
BGCOLOR="#C00000"
107
 
ALIGN="right"
108
 
><A
109
 
HREF="gdk-pixbuf-file-loading.html"
110
 
><FONT
111
 
COLOR="#FFFFFF"
112
 
SIZE="3"
113
 
><B
114
 
>Next Page &#62;&#62;&#62;</B
115
 
></FONT
116
 
></A
117
 
></TD
118
 
></TR
119
 
></TABLE
120
 
></DIV
121
 
><H1
122
 
><A
123
 
NAME="GDK-PIXBUF-REFCOUNTING">Reference Counting and Memory Mangement</H1
124
 
><DIV
125
 
CLASS="REFNAMEDIV"
126
 
><A
127
 
NAME="AEN252"
128
 
></A
129
 
><H2
130
 
>Name</H2
131
 
>Reference Counting and Memory Mangement&nbsp;--&nbsp;Functions to perform reference counting and memory management on a
132
 
GdkPixbuf.</DIV
133
 
><DIV
134
 
CLASS="REFSYNOPSISDIV"
135
 
><A
136
 
NAME="AEN256"><H2
137
 
>Synopsis</H2
138
 
><TABLE
139
 
BORDER="0"
140
 
BGCOLOR="#D6E8FF"
141
 
WIDTH="100%"
142
 
CELLPADDING="6"
143
 
><TR
144
 
><TD
145
 
><PRE
146
 
CLASS="SYNOPSIS"
147
 
>&#13;#include &lt;gdk-pixbuf/gdk-pixbuf.h&gt;
148
 
 
149
 
 
150
 
void        (<A
151
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFDESTROYNOTIFY"
152
 
>*GdkPixbufDestroyNotify</A
153
 
>)       (guchar *pixels,
154
 
                                             gpointer data);
155
 
void        (<A
156
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFLASTUNREF"
157
 
>*GdkPixbufLastUnref</A
158
 
>)           (GdkPixbuf *pixbuf,
159
 
                                             gpointer data);
160
 
GdkPixbuf*  <A
161
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-REF"
162
 
>gdk_pixbuf_ref</A
163
 
>                  (GdkPixbuf *pixbuf);
164
 
void        <A
165
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-UNREF"
166
 
>gdk_pixbuf_unref</A
167
 
>                (GdkPixbuf *pixbuf);
168
 
void        <A
169
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-SET-LAST-UNREF-HANDLER"
170
 
>gdk_pixbuf_set_last_unref_handler</A
171
 
>
172
 
                                            (GdkPixbuf *pixbuf,
173
 
                                             <A
174
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFLASTUNREF"
175
 
>GdkPixbufLastUnref</A
176
 
> last_unref_fn,
177
 
                                             gpointer last_unref_fn_data);
178
 
void        <A
179
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-FINALIZE"
180
 
>gdk_pixbuf_finalize</A
181
 
>             (GdkPixbuf *pixbuf);</PRE
182
 
></TD
183
 
></TR
184
 
></TABLE
185
 
></DIV
186
 
><DIV
187
 
CLASS="REFSECT1"
188
 
><A
189
 
NAME="AEN276"
190
 
></A
191
 
><H2
192
 
>Description</H2
193
 
><P
194
 
>    GdkPixbuf structures are reference counted.  This means that
195
 
    an application can share a single pixbuf among many parts of the
196
 
    code.  When a piece of the program needs to keep a pointer to a
197
 
    pixbuf, it should add a reference to it.  When it no longer needs
198
 
    the pixbuf, it should subtract a reference.  The pixbuf will be
199
 
    destroyed when its reference count drops to zero.  Newly-created
200
 
    GdkPixbuf structures start with a reference count of one.
201
 
  </P
202
 
><P
203
 
>    <SPAN
204
 
CLASS="emphasis"
205
 
><I
206
 
CLASS="EMPHASIS"
207
 
>Finalizing</I
208
 
></SPAN
209
 
> a pixbuf means to free its pixel
210
 
    data and to free the GdkPixbuf structure itself.  Most of the
211
 
    library functions that create GdkPixbuf structures create the
212
 
    pixel data by themselves and define the way it should be freed;
213
 
    you do not need to worry about those.  The only function that lets
214
 
    you specify how to free the pixel data is
215
 
    <A
216
 
HREF="gdk-pixbuf-creating.html#GDK-PIXBUF-NEW-FROM-DATA"
217
 
>gdk_pixbuf_new_from_data</A
218
 
>().  Since you pass it a pre-allocated
219
 
    pixel buffer, you must also specify a way to free that data.  This
220
 
    is done with a function of type <A
221
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFDESTROYNOTIFY"
222
 
>GdkPixbufDestroyNotify</A
223
 
>.  When a
224
 
    pixbuf created with <A
225
 
HREF="gdk-pixbuf-creating.html#GDK-PIXBUF-NEW-FROM-DATA"
226
 
>gdk_pixbuf_new_from_data</A
227
 
>() is finalized, your
228
 
    destroy notification function will be called, and it is its
229
 
    responsibility to free the pixel array.
230
 
  </P
231
 
><P
232
 
>    As an extension to traditional reference counting, GdkPixbuf
233
 
    structures support defining a handler for the last unref
234
 
    operation.  If <A
235
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-UNREF"
236
 
>gdk_pixbuf_unref</A
237
 
>() is called on a GdkPixbuf
238
 
    structure that has a reference count of 1, i.e. its last
239
 
    reference, then the pixbuf's last unref handler function will be
240
 
    called.  It is up to this function to determine whether to
241
 
    finalize the pixbuf using <A
242
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-FINALIZE"
243
 
>gdk_pixbuf_finalize</A
244
 
>() or to just
245
 
    continue execution.  This can be used to implement a pixbuf cache
246
 
    efficiently; please see the programmer's documentation for
247
 
    details.
248
 
  </P
249
 
></DIV
250
 
><DIV
251
 
CLASS="REFSECT1"
252
 
><A
253
 
NAME="AEN293"
254
 
></A
255
 
><H2
256
 
>Details</H2
257
 
><DIV
258
 
CLASS="REFSECT2"
259
 
><A
260
 
NAME="AEN295"
261
 
></A
262
 
><H3
263
 
><A
264
 
NAME="GDKPIXBUFDESTROYNOTIFY"
265
 
></A
266
 
>GdkPixbufDestroyNotify ()</H3
267
 
><TABLE
268
 
BORDER="0"
269
 
BGCOLOR="#D6E8FF"
270
 
WIDTH="100%"
271
 
CELLPADDING="6"
272
 
><TR
273
 
><TD
274
 
><PRE
275
 
CLASS="PROGRAMLISTING"
276
 
>void        (*GdkPixbufDestroyNotify)       (guchar *pixels,
277
 
                                             gpointer data);</PRE
278
 
></TD
279
 
></TR
280
 
></TABLE
281
 
><P
282
 
>    A function of this type is responsible for freeing the pixel array
283
 
    of a pixbuf.  The <A
284
 
HREF="gdk-pixbuf-creating.html#GDK-PIXBUF-NEW-FROM-DATA"
285
 
>gdk_pixbuf_new_from_data</A
286
 
>() function lets you
287
 
    pass in a pre-allocated pixel array so that a pixbuf can be
288
 
    created from it; in this case you will need to pass in a function
289
 
    of <A
290
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFDESTROYNOTIFY"
291
 
>GdkPixbufDestroyNotify</A
292
 
> so that the pixel data can be freed
293
 
    when the pixbuf is finalized.
294
 
  </P
295
 
><DIV
296
 
CLASS="INFORMALTABLE"
297
 
><A
298
 
NAME="AEN304"><P
299
 
></P
300
 
><TABLE
301
 
BORDER="0"
302
 
WIDTH="100%"
303
 
BGCOLOR="#FFD0D0"
304
 
CELLSPACING="0"
305
 
CELLPADDING="4"
306
 
CLASS="CALSTABLE"
307
 
><TBODY
308
 
><TR
309
 
><TD
310
 
WIDTH="20%"
311
 
ALIGN="RIGHT"
312
 
VALIGN="TOP"
313
 
><TT
314
 
CLASS="PARAMETER"
315
 
><I
316
 
>pixels</I
317
 
></TT
318
 
>&nbsp;:</TD
319
 
><TD
320
 
WIDTH="80%"
321
 
ALIGN="LEFT"
322
 
VALIGN="TOP"
323
 
>The pixel array of the pixbuf that is being finalized.</TD
324
 
></TR
325
 
><TR
326
 
><TD
327
 
WIDTH="20%"
328
 
ALIGN="RIGHT"
329
 
VALIGN="TOP"
330
 
><TT
331
 
CLASS="PARAMETER"
332
 
><I
333
 
>data</I
334
 
></TT
335
 
>&nbsp;:</TD
336
 
><TD
337
 
WIDTH="80%"
338
 
ALIGN="LEFT"
339
 
VALIGN="TOP"
340
 
>User closure data.
341
 
&#13;</TD
342
 
></TR
343
 
></TBODY
344
 
></TABLE
345
 
><P
346
 
></P
347
 
></DIV
348
 
></DIV
349
 
><HR><DIV
350
 
CLASS="REFSECT2"
351
 
><A
352
 
NAME="AEN317"
353
 
></A
354
 
><H3
355
 
><A
356
 
NAME="GDKPIXBUFLASTUNREF"
357
 
></A
358
 
>GdkPixbufLastUnref ()</H3
359
 
><TABLE
360
 
BORDER="0"
361
 
BGCOLOR="#D6E8FF"
362
 
WIDTH="100%"
363
 
CELLPADDING="6"
364
 
><TR
365
 
><TD
366
 
><PRE
367
 
CLASS="PROGRAMLISTING"
368
 
>void        (*GdkPixbufLastUnref)           (GdkPixbuf *pixbuf,
369
 
                                             gpointer data);</PRE
370
 
></TD
371
 
></TR
372
 
></TABLE
373
 
><P
374
 
>    A function of this type can be used to override the default
375
 
    operation when a pixbuf loses its last reference, i.e. when
376
 
    <A
377
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-UNREF"
378
 
>gdk_pixbuf_unref</A
379
 
>() is called on a GdkPixbuf structure that has a
380
 
    reference count of 1.  This function should determine whether to
381
 
    finalize the pixbuf by calling <A
382
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-FINALIZE"
383
 
>gdk_pixbuf_finalize</A
384
 
>(), or whether
385
 
    to just resume normal execution.  The last unref handler for a
386
 
    GdkPixbuf can be set using the
387
 
    <A
388
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-SET-LAST-UNREF-HANDLER"
389
 
>gdk_pixbuf_set_last_unref_handler</A
390
 
>() function.  By default, pixbufs
391
 
    will be finalized automatically if no last unref handler has been
392
 
    defined.
393
 
  </P
394
 
><DIV
395
 
CLASS="INFORMALTABLE"
396
 
><A
397
 
NAME="AEN329"><P
398
 
></P
399
 
><TABLE
400
 
BORDER="0"
401
 
WIDTH="100%"
402
 
BGCOLOR="#FFD0D0"
403
 
CELLSPACING="0"
404
 
CELLPADDING="4"
405
 
CLASS="CALSTABLE"
406
 
><TBODY
407
 
><TR
408
 
><TD
409
 
WIDTH="20%"
410
 
ALIGN="RIGHT"
411
 
VALIGN="TOP"
412
 
><TT
413
 
CLASS="PARAMETER"
414
 
><I
415
 
>pixbuf</I
416
 
></TT
417
 
>&nbsp;:</TD
418
 
><TD
419
 
WIDTH="80%"
420
 
ALIGN="LEFT"
421
 
VALIGN="TOP"
422
 
>The pixbuf that is losing its last reference.</TD
423
 
></TR
424
 
><TR
425
 
><TD
426
 
WIDTH="20%"
427
 
ALIGN="RIGHT"
428
 
VALIGN="TOP"
429
 
><TT
430
 
CLASS="PARAMETER"
431
 
><I
432
 
>data</I
433
 
></TT
434
 
>&nbsp;:</TD
435
 
><TD
436
 
WIDTH="80%"
437
 
ALIGN="LEFT"
438
 
VALIGN="TOP"
439
 
>User closure data.
440
 
&#13;</TD
441
 
></TR
442
 
></TBODY
443
 
></TABLE
444
 
><P
445
 
></P
446
 
></DIV
447
 
></DIV
448
 
><HR><DIV
449
 
CLASS="REFSECT2"
450
 
><A
451
 
NAME="AEN342"
452
 
></A
453
 
><H3
454
 
><A
455
 
NAME="GDK-PIXBUF-REF"
456
 
></A
457
 
>gdk_pixbuf_ref ()</H3
458
 
><TABLE
459
 
BORDER="0"
460
 
BGCOLOR="#D6E8FF"
461
 
WIDTH="100%"
462
 
CELLPADDING="6"
463
 
><TR
464
 
><TD
465
 
><PRE
466
 
CLASS="PROGRAMLISTING"
467
 
>GdkPixbuf*  gdk_pixbuf_ref                  (GdkPixbuf *pixbuf);</PRE
468
 
></TD
469
 
></TR
470
 
></TABLE
471
 
><P
472
 
>Adds a reference to a pixbuf.  It must be released afterwards using
473
 
<A
474
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-UNREF"
475
 
>gdk_pixbuf_unref</A
476
 
>().</P
477
 
><P
478
 
>&#13;  </P
479
 
><DIV
480
 
CLASS="INFORMALTABLE"
481
 
><A
482
 
NAME="AEN351"><P
483
 
></P
484
 
><TABLE
485
 
BORDER="0"
486
 
WIDTH="100%"
487
 
BGCOLOR="#FFD0D0"
488
 
CELLSPACING="0"
489
 
CELLPADDING="4"
490
 
CLASS="CALSTABLE"
491
 
><TBODY
492
 
><TR
493
 
><TD
494
 
WIDTH="20%"
495
 
ALIGN="RIGHT"
496
 
VALIGN="TOP"
497
 
><TT
498
 
CLASS="PARAMETER"
499
 
><I
500
 
>pixbuf</I
501
 
></TT
502
 
>&nbsp;:</TD
503
 
><TD
504
 
WIDTH="80%"
505
 
ALIGN="LEFT"
506
 
VALIGN="TOP"
507
 
> A pixbuf.</TD
508
 
></TR
509
 
><TR
510
 
><TD
511
 
WIDTH="20%"
512
 
ALIGN="RIGHT"
513
 
VALIGN="TOP"
514
 
><SPAN
515
 
CLASS="emphasis"
516
 
><I
517
 
CLASS="EMPHASIS"
518
 
>Returns</I
519
 
></SPAN
520
 
> :</TD
521
 
><TD
522
 
WIDTH="80%"
523
 
ALIGN="LEFT"
524
 
VALIGN="TOP"
525
 
> The same as the <TT
526
 
CLASS="PARAMETER"
527
 
><I
528
 
>pixbuf</I
529
 
></TT
530
 
> argument.</TD
531
 
></TR
532
 
></TBODY
533
 
></TABLE
534
 
><P
535
 
></P
536
 
></DIV
537
 
></DIV
538
 
><HR><DIV
539
 
CLASS="REFSECT2"
540
 
><A
541
 
NAME="AEN365"
542
 
></A
543
 
><H3
544
 
><A
545
 
NAME="GDK-PIXBUF-UNREF"
546
 
></A
547
 
>gdk_pixbuf_unref ()</H3
548
 
><TABLE
549
 
BORDER="0"
550
 
BGCOLOR="#D6E8FF"
551
 
WIDTH="100%"
552
 
CELLPADDING="6"
553
 
><TR
554
 
><TD
555
 
><PRE
556
 
CLASS="PROGRAMLISTING"
557
 
>void        gdk_pixbuf_unref                (GdkPixbuf *pixbuf);</PRE
558
 
></TD
559
 
></TR
560
 
></TABLE
561
 
><P
562
 
>Removes a reference from a pixbuf.  If this is the last reference for the
563
 
<TT
564
 
CLASS="PARAMETER"
565
 
><I
566
 
>pixbuf</I
567
 
></TT
568
 
>, then its last unref handler function will be called; if no handler
569
 
has been defined, then the pixbuf will be finalized.</P
570
 
><P
571
 
>See also: <A
572
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-SET-LAST-UNREF-HANDLER"
573
 
>gdk_pixbuf_set_last_unref_handler</A
574
 
>().</P
575
 
><P
576
 
></P
577
 
><DIV
578
 
CLASS="INFORMALTABLE"
579
 
><A
580
 
NAME="AEN375"><P
581
 
></P
582
 
><TABLE
583
 
BORDER="0"
584
 
WIDTH="100%"
585
 
BGCOLOR="#FFD0D0"
586
 
CELLSPACING="0"
587
 
CELLPADDING="4"
588
 
CLASS="CALSTABLE"
589
 
><TBODY
590
 
><TR
591
 
><TD
592
 
WIDTH="20%"
593
 
ALIGN="RIGHT"
594
 
VALIGN="TOP"
595
 
><TT
596
 
CLASS="PARAMETER"
597
 
><I
598
 
>pixbuf</I
599
 
></TT
600
 
>&nbsp;:</TD
601
 
><TD
602
 
WIDTH="80%"
603
 
ALIGN="LEFT"
604
 
VALIGN="TOP"
605
 
> A pixbuf.</TD
606
 
></TR
607
 
></TBODY
608
 
></TABLE
609
 
><P
610
 
></P
611
 
></DIV
612
 
></DIV
613
 
><HR><DIV
614
 
CLASS="REFSECT2"
615
 
><A
616
 
NAME="AEN384"
617
 
></A
618
 
><H3
619
 
><A
620
 
NAME="GDK-PIXBUF-SET-LAST-UNREF-HANDLER"
621
 
></A
622
 
>gdk_pixbuf_set_last_unref_handler ()</H3
623
 
><TABLE
624
 
BORDER="0"
625
 
BGCOLOR="#D6E8FF"
626
 
WIDTH="100%"
627
 
CELLPADDING="6"
628
 
><TR
629
 
><TD
630
 
><PRE
631
 
CLASS="PROGRAMLISTING"
632
 
>void        gdk_pixbuf_set_last_unref_handler
633
 
                                            (GdkPixbuf *pixbuf,
634
 
                                             <A
635
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFLASTUNREF"
636
 
>GdkPixbufLastUnref</A
637
 
> last_unref_fn,
638
 
                                             gpointer last_unref_fn_data);</PRE
639
 
></TD
640
 
></TR
641
 
></TABLE
642
 
><P
643
 
>Sets the handler function for the <TT
644
 
CLASS="PARAMETER"
645
 
><I
646
 
>pixbuf</I
647
 
></TT
648
 
>'s last unref handler.  When
649
 
<A
650
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-UNREF"
651
 
>gdk_pixbuf_unref</A
652
 
>() is called on this pixbuf and it has a reference count of
653
 
1, i.e. its last reference, then the last unref handler will be called.  This
654
 
function should determine whether to finalize the pixbuf or just continue.
655
 
If it wishes to finalize the pixbuf, it should do so by calling
656
 
<A
657
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-FINALIZE"
658
 
>gdk_pixbuf_finalize</A
659
 
>().</P
660
 
><P
661
 
>See also: <A
662
 
HREF="gdk-pixbuf-refcounting.html#GDK-PIXBUF-FINALIZE"
663
 
>gdk_pixbuf_finalize</A
664
 
>().</P
665
 
><P
666
 
></P
667
 
><DIV
668
 
CLASS="INFORMALTABLE"
669
 
><A
670
 
NAME="AEN398"><P
671
 
></P
672
 
><TABLE
673
 
BORDER="0"
674
 
WIDTH="100%"
675
 
BGCOLOR="#FFD0D0"
676
 
CELLSPACING="0"
677
 
CELLPADDING="4"
678
 
CLASS="CALSTABLE"
679
 
><TBODY
680
 
><TR
681
 
><TD
682
 
WIDTH="20%"
683
 
ALIGN="RIGHT"
684
 
VALIGN="TOP"
685
 
><TT
686
 
CLASS="PARAMETER"
687
 
><I
688
 
>pixbuf</I
689
 
></TT
690
 
>&nbsp;:</TD
691
 
><TD
692
 
WIDTH="80%"
693
 
ALIGN="LEFT"
694
 
VALIGN="TOP"
695
 
> A pixbuf.</TD
696
 
></TR
697
 
><TR
698
 
><TD
699
 
WIDTH="20%"
700
 
ALIGN="RIGHT"
701
 
VALIGN="TOP"
702
 
><TT
703
 
CLASS="PARAMETER"
704
 
><I
705
 
>last_unref_fn</I
706
 
></TT
707
 
>&nbsp;:</TD
708
 
><TD
709
 
WIDTH="80%"
710
 
ALIGN="LEFT"
711
 
VALIGN="TOP"
712
 
> Handler function for the last unref.</TD
713
 
></TR
714
 
><TR
715
 
><TD
716
 
WIDTH="20%"
717
 
ALIGN="RIGHT"
718
 
VALIGN="TOP"
719
 
><TT
720
 
CLASS="PARAMETER"
721
 
><I
722
 
>last_unref_fn_data</I
723
 
></TT
724
 
>&nbsp;:</TD
725
 
><TD
726
 
WIDTH="80%"
727
 
ALIGN="LEFT"
728
 
VALIGN="TOP"
729
 
> Closure data to pass to the last unref handler function.</TD
730
 
></TR
731
 
></TBODY
732
 
></TABLE
733
 
><P
734
 
></P
735
 
></DIV
736
 
></DIV
737
 
><HR><DIV
738
 
CLASS="REFSECT2"
739
 
><A
740
 
NAME="AEN415"
741
 
></A
742
 
><H3
743
 
><A
744
 
NAME="GDK-PIXBUF-FINALIZE"
745
 
></A
746
 
>gdk_pixbuf_finalize ()</H3
747
 
><TABLE
748
 
BORDER="0"
749
 
BGCOLOR="#D6E8FF"
750
 
WIDTH="100%"
751
 
CELLPADDING="6"
752
 
><TR
753
 
><TD
754
 
><PRE
755
 
CLASS="PROGRAMLISTING"
756
 
>void        gdk_pixbuf_finalize             (GdkPixbuf *pixbuf);</PRE
757
 
></TD
758
 
></TR
759
 
></TABLE
760
 
><P
761
 
>Finalizes a pixbuf by calling its destroy notification function to free the
762
 
pixel data and freeing the pixbuf itself.  This function is meant to be
763
 
called only from within a <A
764
 
HREF="gdk-pixbuf-refcounting.html#GDKPIXBUFLASTUNREF"
765
 
>GdkPixbufLastUnref</A
766
 
> handler function, and the
767
 
specified <TT
768
 
CLASS="PARAMETER"
769
 
><I
770
 
>pixbuf</I
771
 
></TT
772
 
> must have a reference count of 1, i.e. its last reference.</P
773
 
><P
774
 
></P
775
 
><DIV
776
 
CLASS="INFORMALTABLE"
777
 
><A
778
 
NAME="AEN424"><P
779
 
></P
780
 
><TABLE
781
 
BORDER="0"
782
 
WIDTH="100%"
783
 
BGCOLOR="#FFD0D0"
784
 
CELLSPACING="0"
785
 
CELLPADDING="4"
786
 
CLASS="CALSTABLE"
787
 
><TBODY
788
 
><TR
789
 
><TD
790
 
WIDTH="20%"
791
 
ALIGN="RIGHT"
792
 
VALIGN="TOP"
793
 
><TT
794
 
CLASS="PARAMETER"
795
 
><I
796
 
>pixbuf</I
797
 
></TT
798
 
>&nbsp;:</TD
799
 
><TD
800
 
WIDTH="80%"
801
 
ALIGN="LEFT"
802
 
VALIGN="TOP"
803
 
> A pixbuf with a reference count of 1.</TD
804
 
></TR
805
 
></TBODY
806
 
></TABLE
807
 
><P
808
 
></P
809
 
></DIV
810
 
></DIV
811
 
></DIV
812
 
><DIV
813
 
CLASS="REFSECT1"
814
 
><A
815
 
NAME="AEN433"
816
 
></A
817
 
><H2
818
 
>See Also</H2
819
 
><P
820
 
>    GdkPixbuf, <A
821
 
HREF="gdk-pixbuf-creating.html#GDK-PIXBUF-NEW-FROM-DATA"
822
 
>gdk_pixbuf_new_from_data</A
823
 
>().
824
 
  </P
825
 
></DIV
826
 
><DIV
827
 
CLASS="NAVFOOTER"
828
 
><BR
829
 
CLEAR="all"><BR><TABLE
830
 
WIDTH="100%"
831
 
BORDER="0"
832
 
BGCOLOR="#000000"
833
 
CELLPADDING="1"
834
 
CELLSPACING="0"
835
 
><TR
836
 
><TD
837
 
WIDTH="25%"
838
 
BGCOLOR="#C00000"
839
 
ALIGN="left"
840
 
><A
841
 
HREF="gdk-pixbuf-gdk-pixbuf.html"
842
 
><FONT
843
 
COLOR="#FFFFFF"
844
 
SIZE="3"
845
 
><B
846
 
>&#60;&#60;&#60; Previous Page</B
847
 
></FONT
848
 
></A
849
 
></TD
850
 
><TD
851
 
WIDTH="25%"
852
 
BGCOLOR="#0000C0"
853
 
ALIGN="center"
854
 
><FONT
855
 
COLOR="#FFFFFF"
856
 
SIZE="3"
857
 
><B
858
 
><A
859
 
HREF="index.html"
860
 
><FONT
861
 
COLOR="#FFFFFF"
862
 
SIZE="3"
863
 
><B
864
 
>Home</B
865
 
></FONT
866
 
></A
867
 
></B
868
 
></FONT
869
 
></TD
870
 
><TD
871
 
WIDTH="25%"
872
 
BGCOLOR="#00C000"
873
 
ALIGN="center"
874
 
><FONT
875
 
COLOR="#FFFFFF"
876
 
SIZE="3"
877
 
><B
878
 
><A
879
 
HREF="r27.html"
880
 
><FONT
881
 
COLOR="#FFFFFF"
882
 
SIZE="3"
883
 
><B
884
 
>Up</B
885
 
></FONT
886
 
></A
887
 
></B
888
 
></FONT
889
 
></TD
890
 
><TD
891
 
WIDTH="25%"
892
 
BGCOLOR="#C00000"
893
 
ALIGN="right"
894
 
><A
895
 
HREF="gdk-pixbuf-file-loading.html"
896
 
><FONT
897
 
COLOR="#FFFFFF"
898
 
SIZE="3"
899
 
><B
900
 
>Next Page &#62;&#62;&#62;</B
901
 
></FONT
902
 
></A
903
 
></TD
904
 
></TR
905
 
><TR
906
 
><TD
907
 
COLSPAN="2"
908
 
ALIGN="left"
909
 
><FONT
910
 
COLOR="#FFFFFF"
911
 
SIZE="3"
912
 
><B
913
 
>The GdkPixbuf Structure</B
914
 
></FONT
915
 
></TD
916
 
><TD
917
 
COLSPAN="2"
918
 
ALIGN="right"
919
 
><FONT
920
 
COLOR="#FFFFFF"
921
 
SIZE="3"
922
 
><B
923
 
>File Loading</B
924
 
></FONT
925
 
></TD
926
 
></TR
927
 
></TABLE
928
 
></DIV
929
 
></BODY
930
 
></HTML
931
 
>
 
 
b'\\ No newline at end of file'