Re: how can I trust glib when it has so manymemleaks?



On Thu, Mar 18, 1999 at 12:39:35PM +0000, Ionutz Borcoman wrote:

> I think I made a typo here: I meant to say automatic objects. Like:

That is *much* easyer ;-)

class MemReporter
{
public:
	~MemReporter() { g_mem_profile(); }
};

int main()
{
	MemReporter mem_reporter;
	MyClass x;

	// Do some ;-)
}

And g_mem_profile will be called after the destruction of x. You
migt as well make mem_reporter static of corse....

HTH /Lars



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]