Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAlessio1989

Posted 06 May 2013 - 06:35 PM

After comparing the two different version on debug mode it appears that is a constructor-call problem: since some structures of DirectXMath need aligned allocation I used _aligned_malloc function to have 16-byte aligned data.

 

My bad, I forgot that _aligned_malloc (and all malloc/free etc C-derived memory (de)allocation function) don't call the constructor and the destructor like new and delete...

 

I will try to use the "placement new" syntax, it should solve my problem.


#2Alessio1989

Posted 06 May 2013 - 06:35 PM

After comparing the two different version on debug mode it appears that is a constructor-call problem: since some structures of DirectXMath need aligned allocation I used _aligned_malloc function to have 16-byte aligned data.

 

My bad, I didn't know that _aligned_malloc (and all malloc/free etc C-derived memory (de)allocation function) don't call the constructor and the destructor like new and delete...

 

I will try to use the "placement new" syntax, it should solve my problem.


#1Alessio1989

Posted 06 May 2013 - 06:34 PM

After comparing the two different version on debug mode it appears that is a constructor-call problem.
since some structures of DirectXMath need aligned allocation I used _aligned_malloc function...

 

 

My bad, I didn't know that _aligned_malloc (and all malloc/free etc C-derived memory (de)allocation function) don't call the constructor and the destructor like new and delete...

 

I will try to use the "placement new" syntax, it should solve my problem.


PARTNERS