Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old June 27th, 2008, 05:43 PM
Jimmy Hartzell
Guest
 
Posts: n/a
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?
  #2  
Old June 27th, 2008, 05:43 PM
Jimmy Hartzell
Guest
 
Posts: n/a

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


Jimmy Hartzell wrote:
Quote:
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.
Closed Thread