A
Alvaro
Hi!
I have a problem with this code:
#include <pthread.h>
#include <iostream.h>
int main(int argc, char** argv)
{
while(1)
{
pthread_key_t m_key;
if (pthread_key_create(&m_key,NULL))
cerr<<"Error en create"<<endl<<flush;
if (pthread_key_delete(m_key))
cerr<<"Error en delete"<<endl<<flush;
}
};
This code is leaking memory in each iteration and i don't know where is the
problem. This program is ran with Solaris Operation System, and the compiler
is SUN CC 6.0.
Thanks, Alvaro
I have a problem with this code:
#include <pthread.h>
#include <iostream.h>
int main(int argc, char** argv)
{
while(1)
{
pthread_key_t m_key;
if (pthread_key_create(&m_key,NULL))
cerr<<"Error en create"<<endl<<flush;
if (pthread_key_delete(m_key))
cerr<<"Error en delete"<<endl<<flush;
}
};
This code is leaking memory in each iteration and i don't know where is the
problem. This program is ran with Solaris Operation System, and the compiler
is SUN CC 6.0.
Thanks, Alvaro