class1::start()
{
test1() ;
}
------------------------------------------------------------------------------------
class2::test1()
{
ret_status = test2();
}
-------------------------------------------------------------------
class3::test2()
{
temp_stop = new Groupclass(this );//Groupclass is the name of the some other class
test3(temp_stop );
}
---------------------------------------------------------------------------
class4::test3( const char * attr )
{
status = test4( attr );
}
-------------------------------------------------------------------------------
class5::test4(c onst char * attr_name )
{
set_status = test5( d_string );
}
--------------------------------------------------------------------------------------------------
class6::test5( const char *con_string)
{
result =test6( con_string);
temp1( result);
result = test7(con_strin g);
temp2(result);
}
--------------------------------------------------------------------------------
class7::test6( const char *string_to_tran sfer )
{
delete[] pstring;
pstring = test7( string_to_trans fer );
if( pstring != NULL ) {
memcpy( (char *) &pstring[sizeof( int )] );
}
return pstring;
}
--------------------------------------------------------------------------------
class8::test7( const char *string_to_tran sfer )
{
pstring = buffers.test8() ;
return pstring;
}
---------------------------------------------------------------------------------------
class9::test8()
{
group = new char[totalsize + 1];
k = group;
memcpy(k);
group[totalsize] = '\0';
return group;
}
----------------------------------------------------------
I got the memory leak is reported in test8 function ,I am not sure that the mmeory leak in this test8 function only,Could any one go through the code and help me where the memork leak is occuring
Thanks
Muthu
{
test1() ;
}
------------------------------------------------------------------------------------
class2::test1()
{
ret_status = test2();
}
-------------------------------------------------------------------
class3::test2()
{
temp_stop = new Groupclass(this );//Groupclass is the name of the some other class
test3(temp_stop );
}
---------------------------------------------------------------------------
class4::test3( const char * attr )
{
status = test4( attr );
}
-------------------------------------------------------------------------------
class5::test4(c onst char * attr_name )
{
set_status = test5( d_string );
}
--------------------------------------------------------------------------------------------------
class6::test5( const char *con_string)
{
result =test6( con_string);
temp1( result);
result = test7(con_strin g);
temp2(result);
}
--------------------------------------------------------------------------------
class7::test6( const char *string_to_tran sfer )
{
delete[] pstring;
pstring = test7( string_to_trans fer );
if( pstring != NULL ) {
memcpy( (char *) &pstring[sizeof( int )] );
}
return pstring;
}
--------------------------------------------------------------------------------
class8::test7( const char *string_to_tran sfer )
{
pstring = buffers.test8() ;
return pstring;
}
---------------------------------------------------------------------------------------
class9::test8()
{
group = new char[totalsize + 1];
k = group;
memcpy(k);
group[totalsize] = '\0';
return group;
}
----------------------------------------------------------
I got the memory leak is reported in test8 function ,I am not sure that the mmeory leak in this test8 function only,Could any one go through the code and help me where the memork leak is occuring
Thanks
Muthu
Comment