470,855 Members | 1,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Re: newbie -- smart pointer destructor called without destructorever being called

Specifically this function:
void fill_all(GCReference<GCTestwhat_with) {
for(int i = 0; i < 16; i++) {
refs[i] = what_with;
}
}

Some destructor seems to be getting called within this function, on an
improperly constructed object, in the body of the loop (at the end of
it). Why would that be?
Jun 27 '08 #1
1 889
Jimmy Hartzell wrote:
Specifically this function:
void fill_all(GCReference<GCTestwhat_with) {
for(int i = 0; i < 16; i++) {
refs[i] = what_with;
}
}

Some destructor seems to be getting called within this function, on an
improperly constructed object, in the body of the loop (at the end of
it). Why would that be?
Right. My assignment operator wasn't returning anything. Fixed. Sorry.
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Johnny Hansen | last post: by
27 posts views Thread by Susan Baker | last post: by
33 posts views Thread by Ney André de Mello Zunino | last post: by
7 posts views Thread by sip.address | last post: by
1 post views Thread by mosfet | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.