Address of a class object
    Ali Çehreli 
    acehreli at yahoo.com
       
    Wed Jan  4 21:20:12 UTC 2023
    
    
  
On 1/4/23 12:02, Steven Schveighoffer wrote:
 > On 1/4/23 2:27 PM, Ali Çehreli wrote:
 >> I put the objects into a 2-length
 >> static array but the difference was still 0x20. (?)
 >
 > Are you putting the class *references* in a 2-length static array?
I lied. As I could not put the objects in a static array, I put them on 
the stack with the 'scope' keyword and the difference was still 0x20. 
(Of course, I could emplace the objects myself in my static array but 
that wouldn't prove anything about why the current alignment appears to 
be 0x20.)
 > stop worrying about the addresses
 > given out by the GC
No worries; just trying to explain...
Ali
    
    
More information about the Digitalmars-d-learn
mailing list