[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re[2]: Session Management with KUniqueApplication
From:       DeBug <debug () centras ! lt>
Date:       2003-09-30 14:01:00
[Download RAW message or body]

I use Borland C++ Builder and i must tell you Borland all the time
uses new-delete
Borland also wraps it in exceptions handling *catch* blocks!!!
You see how it is important to execute *delete*.

LL> {
LL> MyFoo* foo = new MyFoo;
foo->>whatever();
LL> delete foo;
LL> }
every *new* must have a corresponding *delete* because compiler will
not deallocate automatically. This can be seen when tracing execution step by
step in Borland C++ Builder

LL> you can as well write it as 
LL> {
LL> MyFoo foo;
LL> foo.whatever();
LL> }
In that example yes compiler will insert deallocation code. I find it
to be old-fashioned way but in certain cases when performance is
important it is used (working with stack-objects is faster).
I really lack good debugging tools under Linux to see how exactly my
code is executed, inspecting variables values etc etc. This helped me
to avoid lots of hidden 'underwater' mistakes.


 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic