2013-07-17 02:26:30 +04:00
|
|
|
#include <SDL.h>
|
2013-07-17 12:01:13 +04:00
|
|
|
#include <stdio.h>
|
2013-07-17 02:26:30 +04:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
2013-07-17 12:01:13 +04:00
|
|
|
SDL_Surface* surface = SDL_CreateRGBSurface(SDL_SWSURFACE, 10, 10, 32,
|
|
|
|
0, 0, 0, 0);
|
|
|
|
SDL_Surface *reference = surface;
|
2013-07-17 02:26:30 +04:00
|
|
|
reference->refcount++;
|
2013-07-17 12:01:13 +04:00
|
|
|
SDL_FreeSurface(surface);
|
2013-07-17 02:26:30 +04:00
|
|
|
SDL_FreeSurface(reference);
|
2013-07-17 12:01:13 +04:00
|
|
|
int result = surface->refcount;
|
2013-07-17 02:26:30 +04:00
|
|
|
REPORT_RESULT();
|
|
|
|
return 0;
|
|
|
|
}
|