المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Static pointer



C++ Programming
08-13-2009, 07:00 PM
Hi,
I have a static pointer in a class and im allocating memory in heap in a static function..and that function returns the same pointer...

then im using that function in some other class...now when should i deallocate the memory in heap....in the destructor of the class where the static pointer belongs to...?

Please correct me if im wrong..