use glib wrappers where possible for safe memory freeing

This commit is contained in:
Evgeniy Dushistov
2013-07-07 17:07:02 +00:00
parent 9034e792b6
commit c3d733b1fc
2 changed files with 18 additions and 24 deletions

View File

@@ -21,12 +21,13 @@ public:
}
friend inline T *get_impl(const ResourceWrapper& rw) {
return rw.p_;
return rw.p_;
}
friend inline T **get_addr(ResourceWrapper& rw) {
return &rw.p_;
return &rw.p_;
}
private:
T *p_;
@@ -56,4 +57,3 @@ namespace glib {
extern char *locale_to_utf8(const char *locstr);
extern std::string utf8_to_locale_ign_err(const std::string& utf8_str);