08-18-2009
exit in cpp
In a program if we call exit(0), it exits the program and before that it closes all opened stream.
In C++, it even does destroys the created objects. Is there any function available, which if called will do some basic clean ups (which includes object destruction) ???
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi am very new to unix.I got installed linux mandrake and the first problem is whith the modem i don't know why but it does not work. i config it on /dev/modem
and some time it says
"the modem is bussy"
and some time it says:
"Modem ready"
but the modem did'n switch on
Ok the other question... (3 Replies)
Discussion started by: user666
3 Replies
2. Programming
sir
i am trying to compile and execute cpp file in unix
the command cpp <filename > is not working
do you suggest any other command?
thanking you (5 Replies)
Discussion started by: sandhyapidugu
5 Replies
3. UNIX for Dummies Questions & Answers
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Discussion started by: jkuchar747
3 Replies
4. Programming
gcc help iam using kubuntu os (www.ubuntu.com) in that i dont find gcc but cpp command is there how to compile code with that
& how to use gij for java in ubuntu (1 Reply)
Discussion started by: seshumohan
1 Replies
5. Shell Programming and Scripting
I'm trying to develop a script that makes it so only .cpp programs can print. I'm doing it for my computer programming class because everyone keeps printing the executable instead of the source code and it's wasting a lot of paper. How can I accomplish this? Thanks for the help. :D (5 Replies)
Discussion started by: Irish_Cereal
5 Replies
6. Shell Programming and Scripting
I need to find all the methods in a cpp file ... using shell script
Pls guide me regarding the grep criteria for searching methods
I mean what are the patterns to be grepped in *.cpp which match methods
Hope i have made myself clear
Thanks and Regards
-- Ultimatix (2 Replies)
Discussion started by: ultimatix
2 Replies
7. Shell Programming and Scripting
Hi all,
can we convert a cpp program to perl scripting ? (4 Replies)
Discussion started by: Shell_Learner
4 Replies
8. Programming
I have the code below and cannot decide if to put it in a .h file or in a .cpp file
#ifndef VERBOSE_H
#define VERBOSE_H
#include "sstring.h"
enum Verbose { none = 0, low = 1, medium = 2, high = 3, diag = 4 };
bool GetVerbose(String& S, Verbose& V) {
S.ToUpper();
if (S ==... (3 Replies)
Discussion started by: kristinu
3 Replies
LEARN ABOUT DEBIAN
devel::globaldestruction
Devel::GlobalDestruction(3pm) User Contributed Perl Documentation Devel::GlobalDestruction(3pm)
NAME
Devel::GlobalDestruction - Expose the flag which marks global destruction.
SYNOPSIS
package Foo;
use Devel::GlobalDestruction;
use namespace::clean; # to avoid having an "in_global_destruction" method
sub DESTROY {
return if in_global_destruction;
do_something_a_little_tricky();
}
DESCRIPTION
Perl's global destruction is a little tricky to deal with WRT finalizers because it's not ordered and objects can sometimes disappear.
Writing defensive destructors is hard and annoying, and usually if global destruction is happenning you only need the destructors that free
up non process local resources to actually execute.
For these constructors you can avoid the mess by simply bailing out if global destruction is in effect.
EXPORTS
This module uses Sub::Exporter so the exports may be renamed, aliased, etc.
in_global_destruction
Returns true if the interpreter is in global destruction. In perl 5.14+, this returns "${^GLOBAL_PHASE} eq 'DESTRUCT'", and on earlier
perls, it returns the current value of "PL_dirty".
AUTHORS
Yuval Kogman <nothingmuch@woobling.org>
Florian Ragwitz <rafl@debian.org>
Jesse Luehrs <doy@tozt.net>
Peter Rabbitson <ribasushi@cpan.org>
COPYRIGHT
Copyright (c) 2008 Yuval Kogman. All rights reserved
This program is free software; you can redistribute
it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-06-13 Devel::GlobalDestruction(3pm)