Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Can I delete a static pointer?

Reply
Thread Tools

Can I delete a static pointer?

 
 
dolphin
Guest
Posts: n/a
 
      11-30-2007
Can I delete a static pointer?
 
Reply With Quote
 
 
 
 
Christopher Pisz
Guest
Posts: n/a
 
      11-30-2007

"dolphin" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Can I delete a static pointer?


You can call delete on a static pointer and release the memory it points to
if it indeed points to memory that was allocated. If you are intending on
calling delete on a static pointer that is shared amongst multiple objects
I'd be careful...




 
Reply With Quote
 
 
 
 
asterisc
Guest
Posts: n/a
 
      11-30-2007
On Nov 30, 7:44 am, dolphin <(E-Mail Removed)> wrote:
> Can I delete a static pointer?


Yes...

Even if it's static, you need to manage the pointer - new/delete
operations!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I access non-static variables from static funcition? Neviton C++ 9 09-17-2007 10:21 PM
Why inner class can not have static data, static fields or nested class? Robin Java 0 06-06-2007 11:16 AM
Can a static function declaration conflict with a non-static declaration? nospam_timur@tabi.org C Programming 4 12-12-2006 10:26 PM
Can someone tell me why I can't delete this file? and why it blue screens WinXP Pro on delete? zZz Computer Support 1 01-12-2005 02:37 AM
Can't access static member var from static method. Why? Markus Dehmann C++ 5 07-01-2004 04:16 PM



Advertisments