mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-19 11:35:12 +00:00
Added destroy methods to some functions to fix memory leaks. (#535)
This commit is contained in:
parent
10621e61b1
commit
124b3dfaa4
@ -61,6 +61,7 @@ typedef struct _cairo_matrix {
|
|||||||
double x0;
|
double x0;
|
||||||
double y0;
|
double y0;
|
||||||
static tolua_outside cairo_matrix_t* create_cairo_matrix_t @ create();
|
static tolua_outside cairo_matrix_t* create_cairo_matrix_t @ create();
|
||||||
|
static tolua_outside void destroy_cairo_matrix_t @ destroy(cairo_matrix_t *pointer);
|
||||||
} cairo_matrix_t;
|
} cairo_matrix_t;
|
||||||
typedef int cairo_bool_t;
|
typedef int cairo_bool_t;
|
||||||
|
|
||||||
@ -410,6 +411,7 @@ typedef struct {
|
|||||||
double x_advance;
|
double x_advance;
|
||||||
double y_advance;
|
double y_advance;
|
||||||
static tolua_outside cairo_text_extents_t* create_cairo_text_extents_t @ create();
|
static tolua_outside cairo_text_extents_t* create_cairo_text_extents_t @ create();
|
||||||
|
static tolua_outside void destroy_cairo_text_extents_t @ destroy(cairo_text_extents_t *pointer);
|
||||||
} cairo_text_extents_t;
|
} cairo_text_extents_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -419,6 +421,7 @@ typedef struct {
|
|||||||
double max_x_advance;
|
double max_x_advance;
|
||||||
double max_y_advance;
|
double max_y_advance;
|
||||||
static tolua_outside cairo_font_extents_t* create_cairo_font_extents_t @ create();
|
static tolua_outside cairo_font_extents_t* create_cairo_font_extents_t @ create();
|
||||||
|
static tolua_outside void destroy_cairo_font_extents_t @ destroy(cairo_font_extents_t *pointer);
|
||||||
} cairo_font_extents_t;
|
} cairo_font_extents_t;
|
||||||
|
|
||||||
typedef enum _cairo_font_slant {
|
typedef enum _cairo_font_slant {
|
||||||
|
@ -39,4 +39,17 @@ cairo_matrix_t *create_cairo_matrix_t(void) {
|
|||||||
return calloc(1, sizeof(cairo_matrix_t));
|
return calloc(1, sizeof(cairo_matrix_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void destroy_cairo_text_extents_t(cairo_text_extents_t *pointer) {
|
||||||
|
free(pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void destroy_cairo_font_extents_t(cairo_font_extents_t *pointer) {
|
||||||
|
free(pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
void destroy_cairo_matrix_t(cairo_matrix_t *pointer) {
|
||||||
|
free(pointer);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endif /* _LIBCAIRO_HELPER_H_ */
|
#endif /* _LIBCAIRO_HELPER_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user