use skynet malloc api directly

This commit is contained in:
Cloud Wu
2014-04-22 12:26:08 +08:00
parent 08c511160f
commit 75a28b0fcc
19 changed files with 98 additions and 107 deletions

View File

@@ -11,7 +11,7 @@ struct logger {
struct logger *
logger_create(void) {
struct logger * inst = malloc(sizeof(*inst));
struct logger * inst = skynet_malloc(sizeof(*inst));
inst->handle = NULL;
inst->close = 0;
return inst;
@@ -22,7 +22,7 @@ logger_release(struct logger * inst) {
if (inst->close) {
fclose(inst->handle);
}
free(inst);
skynet_free(inst);
}
static int