Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1393)

Unified Diff: runtime/embedders/openglui/common/resource.h

Issue 13042015: Various OpenGLUI changes: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/embedders/openglui/common/resource.h
===================================================================
--- runtime/embedders/openglui/common/resource.h (revision 20570)
+++ runtime/embedders/openglui/common/resource.h (working copy)
@@ -10,10 +10,10 @@
class Resource {
public:
explicit Resource(const char* path)
- : path_(path),
- descriptor_(-1),
+ : descriptor_(-1),
start_(0),
length_(-1) {
+ path_ = strdup(path);
}
const char* path() {
@@ -44,10 +44,11 @@
}
virtual ~Resource() {
+ free(path_);
}
protected:
- const char* path_;
+ char* path_;
int32_t descriptor_;
off_t start_;
off_t length_;

Powered by Google App Engine
This is Rietveld 408576698