Wiki Page Content

Differences between revisions 1 and 4 (spanning 3 versions)
Revision 1 as of 2010-06-14 01:01:07
Size: 654
Editor: SheenaSmith
Comment: create page, add content (Wed Mar 10 ver; changeset 4428)
Revision 4 as of 2013-08-08 18:12:18
Size: 1001
Editor: RyanGordon
Comment: Rewritten
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to ^release a specified area as a read/write target^. ??? Use this function to free an SDL_RWops structure allocated by [[SDL_AllocRW]]().
Line 16: Line 15:
||'''area'''||^the area being pointed to by an SDL_RWops structure to be freed^ ???|| ||'''area'''||the SDL_RWops structure to be freed||
Line 20: Line 19:
You can add your code example here /* this would be your RWops implementation's "close" method. */
void close_my_rwops(SDL_RWops *rw)
{
    if(rw != NULL) {
        /* close any other resources. */
        SDL_FreeRW(rw);
    }
}
Line 24: Line 30:
''You can add useful comments here'' Only use [[SDL_FreeRW]]() on pointers returned by [[SDL_AllocRW]](). The pointer is invalid as soon as this function returns. Any extra memory allocated during creation of the RWops is not freed by [[SDL_FreeRW]](); the programmer must be responsible for managing that memory in their '''close''' method.
Line 27: Line 33:
 .[[SDL_AllocRW]] ???  .[[SDL_AllocRW]] *

SDL_FreeRW

Use this function to free an SDL_RWops structure allocated by SDL_AllocRW().

Syntax

void SDL_FreeRW(SDL_RWops* area)

Function Parameters

area

the SDL_RWops structure to be freed

Code Examples

/* this would be your RWops implementation's "close" method. */
void close_my_rwops(SDL_RWops *rw)
{
    if(rw != NULL) {
        /* close any other resources. */
        SDL_FreeRW(rw);
    }
}

Remarks

Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is invalid as soon as this function returns. Any extra memory allocated during creation of the RWops is not freed by SDL_FreeRW(); the programmer must be responsible for managing that memory in their close method.


CategoryAPI, CategoryIO

None: SDL_FreeRW (last edited 2015-06-20 20:07:06 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit