   SDL_RWops question
  Suppose I create an SDL_RWops using SDL_RWFromMem. I found that when calling SDL_FreeRW, it segfaults on me.I then checked the docs for SDL_FreeRW, and they say you should only use it for RW's I've created using SDL_AllocRW. The question is, how do I free a RWops I created using SDL_RWFromMem? Do I just delete it? That sounds very fishy...I am assuming the segfault occurs because SDL_FreeRW does some kind of buffer deallocation that assumes it was allocated in a certain way (and if it wasn't, well then it chews up some memory it shouldn't).Any ideas?EDIT: ACK! Silly me, I passed in freesrc = 1 somewhere. Damn source code tutorials :-DBut really, why does the doc say SDL_FreeRW should only be used on those allocated by SDL_AllocRW? Maybe all those other calls use that under the hood...   
  Exactly:)SDL_RWops *SDL_RWFromMem(void *mem, int size){SDL_RWops *rwops;rwops = SDL_AllocRW();if ( rwops != NULL ) {rwops->seek = mem_seek;rwops->read = mem_read;rwops->write = mem_write;rwops->close = mem_close;rwops->hidden.mem.base = (Uint8 *)mem;rwops->hidden.mem.here = rwops->hidden.mem.base;rwops->hidden.mem.stop = rwops->hidden.mem.base+size;}return(rwops);}SDL_RWops *SDL_AllocRW(void){SDL_RWops *area;area = (SDL_RWops *)malloc(sizeof *area);if ( area == NULL ) {SDL_OutOfMemory();}return(area);}void SDL_FreeRW(SDL_RWops *area){free(area);};  Oh snap :-).   