Commit df5191ca by Aaron Leung

The Context objects should have a Node_Factory.

parent 490a56f1
...@@ -44,6 +44,7 @@ namespace Sass { ...@@ -44,6 +44,7 @@ namespace Sass {
source_refs(vector<char*>()), source_refs(vector<char*>()),
registry(vector<vector<Node>*>()), registry(vector<vector<Node>*>()),
include_paths(vector<string>()), include_paths(vector<string>()),
new_Node(Node_Factory()),
ref_count(0) ref_count(0)
{ {
register_functions(); register_functions();
...@@ -55,6 +56,8 @@ namespace Sass { ...@@ -55,6 +56,8 @@ namespace Sass {
for (size_t i = 0; i < source_refs.size(); ++i) { for (size_t i = 0; i < source_refs.size(); ++i) {
delete[] source_refs[i]; delete[] source_refs[i];
} }
new_Node.free();
// cerr << "Deallocated " << i << " source string(s)." << endl; // cerr << "Deallocated " << i << " source string(s)." << endl;
} }
......
...@@ -45,10 +45,11 @@ namespace Sass { ...@@ -45,10 +45,11 @@ namespace Sass {
vector<char*> source_refs; // all the source c-strings vector<char*> source_refs; // all the source c-strings
vector<vector<Node>*> registry; // all the child vectors vector<vector<Node>*> registry; // all the child vectors
vector<string> include_paths; vector<string> include_paths;
Node_Factory new_node;
size_t ref_count; size_t ref_count;
string sass_path; string sass_path;
string css_path; string css_path;
void collect_include_paths(const char* paths_str); void collect_include_paths(const char* paths_str);
Context(const char* paths_str = 0); Context(const char* paths_str = 0);
~Context(); ~Context();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment