cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
General C++ Programming
can destructors take parameters?
can destructors take parameters?
Aug 24, 2009 at 9:07pm UTC
joe3dge
(17)
could you write:
1
2
3
4
5
6
7
8
9
10
11
12
class
foo { foo() {
//code
} ~foo(
int
bar) {
//code
} }
Aug 24, 2009 at 9:24pm UTC
Robertlzw
(103)
No, You can not. If you do want to customize the dtor (deleter), i.e., close database connection when calling the dtor, use boost::shared_ptr.
Aug 25, 2009 at 4:01am UTC
joe3dge
(17)
what is boost::shared_ptr?
Aug 25, 2009 at 12:56pm UTC
Robertlzw
(103)
It is a C++ library to be used in the coming 0x C++ standard.
http://www.boost.org/
Topic archived. No new replies allowed.