Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 1

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 1

Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 8

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 8

gf_surface_free()

Free a surface

Synopsis:

#include <gf/gf.h>

void gf_surface_free( gf_surface_t surface );

Arguments:

psurface
The handle of the surface you want to free.

Library:

gf

Description:

This function frees a surface (gf_surface_t) created with gf_surface_create(), gf_surface_create_layer(), gf_surface_attach(), or gf_surface_attach_by_sid(). Call this only once you are done with a surface and no remaining contexts are targeting it. If the frame data buffer was allocated automatically, it also will be freed.


Note: When deallocating surfaces created with gf_surface_attach(), the frame data buffer won't be automatically freed. It's up to the application to free this memory at an appropriate time.

Because multiple processes may be using a surface attached via gf_surface_attach_by_sid(), this function will free the associated gf_surface_t, but not necessarily the frame data buffer. See gf_surface_attach_by_sid() for more information.

The gf_dev_detach() function automatically frees all associated surfaces.



WARNING: Threads should not call this function between calls to gf_draw_begin() and gf_draw_end(), or a deadlock will occur.

Classification:

QNX Graphics Framework

Safety:
Interrupt handler No
Signal handler No
Thread Yes

See also:

gf_surface_attach(), gf_surface_create(), gf_surface_create_layer()


Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 120

Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/gf/dev_guide/api/gf_surface_free.html on line 120