| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) | 
Recycle a surface previously created with gf_surface_attach()
#include <gf/gf.h>
int gf_surface_reattach( gf_surface_t            surface,
                         int                     w,
                         int                     h,
                         int                     stride,
                         const gf_palette_t *    palette,
                         uint8_t *               ptr,
                         unsigned                flags );
gf
This function recycles a surface that was previously created with gf_surface_attach(). This function allows a different region of memory to be associated with the specified surface. The format of the data must remain the same.
This function is designed to be fast, and avoids re-allocation of memory in situations where you want to re-use a surface repeatedly.
QNX Graphics Framework
| Safety: | |
|---|---|
| Interrupt handler | No | 
| Signal handler | No | 
| Thread | Yes | 
gf_palette_t, gf_surface_attach(), gf_surface_create(), gf_surface_create_layer(), gf_surface_free()
| ![[Previous]](../prev.gif) | ![[Contents]](../contents.gif) | ![[Index]](../keyword_index.gif) | ![[Next]](../next.gif) |