mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
exec_node: Remove destructor from exec_node and all descendants.
Two of these destructors are non-empty, (s_symbol and s_list), so this commit could potentially introduce memory leaks, (though, no additional leaks are found in glsl-orangebook-ch06-bump.frag at least---perhaps the current code is never calling delete on these classes?). Going forward, we will switch to talloc for exec_node so we won't need explicit destrcutors to free up any memory used.
This commit is contained in:
parent
f961e4458f
commit
015b3a5115
2 changed files with 0 additions and 23 deletions
|
|
@ -34,25 +34,10 @@ s_symbol::s_symbol(const char *tmp)
|
|||
strcpy(this->str, tmp);
|
||||
}
|
||||
|
||||
s_symbol::~s_symbol()
|
||||
{
|
||||
delete [] this->str;
|
||||
this->str = NULL;
|
||||
}
|
||||
|
||||
s_list::s_list()
|
||||
{
|
||||
}
|
||||
|
||||
s_list::~s_list()
|
||||
{
|
||||
exec_list_iterator it(this->subexpressions.iterator());
|
||||
while (it.has_next())
|
||||
it.remove();
|
||||
|
||||
assert(this->subexpressions.is_empty());
|
||||
}
|
||||
|
||||
unsigned
|
||||
s_list::length() const
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@
|
|||
class s_expression : public exec_node
|
||||
{
|
||||
public:
|
||||
virtual ~s_expression() { }
|
||||
|
||||
/**
|
||||
* Read an S-Expression from the given string.
|
||||
* Advances the supplied pointer to just after the expression read.
|
||||
|
|
@ -73,8 +71,6 @@ protected:
|
|||
class s_number : public s_expression
|
||||
{
|
||||
public:
|
||||
virtual ~s_number() { }
|
||||
|
||||
bool is_number() const { return true; }
|
||||
|
||||
virtual float fvalue() = 0;
|
||||
|
|
@ -87,7 +83,6 @@ class s_int : public s_number
|
|||
{
|
||||
public:
|
||||
s_int(int x) : val(x) { }
|
||||
virtual ~s_int() { }
|
||||
|
||||
bool is_int() const { return true; }
|
||||
|
||||
|
|
@ -104,7 +99,6 @@ class s_float : public s_number
|
|||
{
|
||||
public:
|
||||
s_float(float x) : val(x) { }
|
||||
virtual ~s_float() { }
|
||||
|
||||
float fvalue() { return this->val; }
|
||||
|
||||
|
|
@ -118,7 +112,6 @@ class s_symbol : public s_expression
|
|||
{
|
||||
public:
|
||||
s_symbol(const char *);
|
||||
virtual ~s_symbol();
|
||||
|
||||
bool is_symbol() const { return true; }
|
||||
|
||||
|
|
@ -135,7 +128,6 @@ class s_list : public s_expression
|
|||
{
|
||||
public:
|
||||
s_list();
|
||||
virtual ~s_list();
|
||||
|
||||
virtual bool is_list() const { return true; }
|
||||
unsigned length() const;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue