FreeRDP
geometry.c
1 
20 #include <freerdp/config.h>
21 
22 #include <freerdp/client/geometry.h>
23 #include <winpr/interlocked.h>
24 
25 void mappedGeometryRef(MAPPED_GEOMETRY* g)
26 {
27  InterlockedIncrement(&g->refCounter);
28 }
29 
30 void mappedGeometryUnref(MAPPED_GEOMETRY* g)
31 {
32  if (!g)
33  return;
34 
35  if (InterlockedDecrement(&g->refCounter))
36  return;
37 
38  g->MappedGeometryUpdate = NULL;
39  g->MappedGeometryClear = NULL;
40  g->custom = NULL;
41  free(g->geometry.rects);
42  free(g);
43 }