Use union in Boolean to save space
[satune.git] / src / Encoders / elementencoding.c
index b97fee0cb53d49d6cf61b1ff0a9f23a39810d731..095f99ded848dc8dc3d4316b951a0eef971de42e 100644 (file)
@@ -4,9 +4,16 @@ ElementEncoding * allocElementEncoding(ElementEncodingType type, Element *elemen
        ElementEncoding * this=(ElementEncoding *)ourmalloc(sizeof(ElementEncoding));
        this->element=element;
        this->type=type;
+       this->variables=NULL;
+       this->encodingArray=NULL;
+       this->numVars=0;
        return this;
 }
 
 void deleteElementEncoding(ElementEncoding *this) {
+       if (this->variables!=NULL)
+               ourfree(this->variables);
+       if (this->encodingArray!=NULL)
+               ourfree(this->encodingArray);
        ourfree(this);
 }