X-Git-Url: https://git.llucax.com/z.facultad/75.68/celdas.git/blobdiff_plain/3614a9b0d6ac477997b3b88d7362494e55538dc3..c70ce6aaf1ea2313edd5754c063d866c2aba4975:/trunk/src/indicemagico.h?ds=sidebyside diff --git a/trunk/src/indicemagico.h b/trunk/src/indicemagico.h index 4c3396e..7b28472 100644 --- a/trunk/src/indicemagico.h +++ b/trunk/src/indicemagico.h @@ -24,8 +24,8 @@ public: CIndiceMagico() { m_cant = 0 ; - m_nombres = (std::string*)calloc(sizeof(std::string), MAX_ELEMENTOS) ; - m_datos = (T*)calloc(sizeof(m_datos), MAX_ELEMENTOS) ; + m_nombres = new std::string[MAX_ELEMENTOS]; + m_datos = new T[MAX_ELEMENTOS]; if (!m_nombres) @@ -36,6 +36,12 @@ public: } + ~CIndiceMagico() + { + delete m_nombres; + delete m_datos; + } + public: void add(const char* nombre, const T dato) {