class1::start()
{
test1() ;
}
------------------------------------------------------------------------------------
class2::test1()
{
ret_status = test2();
}
-------------------------------------------------------------------
class3::test2()
{
temp_stop = new Groupclass(this );//Groupclass is the name of the...
User Profile
Collapse
-
Memory leak due to new object
-
Deallocating ostream in C++ to avoid Memory leaks
Can anyone please tell how to delete or deallocate the sql_stream for the following 2 questions:
Qn:1
ostrstream *sql_stream = new ostrstream;
Qn:2
ostrstream sql_stream
char *sql_buffer;
sql_buffer = sql_stream.str( );
for the Qn.1
I use
delete sql_stream;
sql_stream = NULL;
to deallocate... -
-
Thank you Banfa
Could you please tell how to delete or deallocate the following 2 questions:
Qn:1
ostrstream *sql_stream = new ostrstream;
Qn:2
ostrstream sql_stream
char *sql_buffer;
sql_buffer = sql_stream.str( );
for the Qn.1
I use
delete sql_stream;
sql_stream = NULL;
to deallocate it
for the Qn.2
...Leave a comment:
-
Memory leak due to ostream in C++
Hi,
I am using the ostream in my C++ program by including the headerfile #include <strstream.h> in solaris 10.2
But it showing the following memory leaks in the following functions.
void*operator new(unsigned) [rtlib.o]
void*operator new[](unsigned) [rtlib.o]
int strstreambuf::o verflow(int) [libiostream.so. 1]
int streambuf::xspu tn(const char*,int) [libiostream.so. 1]
... -
Memory leak due to RWCstring
Hi,
I am using RWCstring in my C++ program by including the header file #include <rw/cstring.h> in Solaris10.2.
But it showing the following memory leaks in the following functions.
RWCStringRef*RW CStringRef::get Rep(unsigned,un signed,void*) [librwtool.so.2]
RWCString&RWCSt ring::replace(u nsigned,unsigne d,const char*,unsigned) [librwtool.so.2]
RWCString&RWCSt ring::append(co nst...
No activity results to display
Show More
Leave a comment: