www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - rtInfo()

reply Satoshi <satoshi rikarin.org> writes:
Hello,
is rtInfo() already used by GC?
I need to store some data for each class so I'm using this 
template and m_rtInfo in TypeInfo_Class but now it seems that GC 
is not working properly in some cases.

Thanks.
Dec 14 2016
parent rikki cattermole <rikki cattermole.co.nz> writes:
On 14/12/2016 11:52 PM, Satoshi wrote:
 Hello,
 is rtInfo() already used by GC?
 I need to store some data for each class so I'm using this template and
 m_rtInfo in TypeInfo_Class but now it seems that GC is not working
 properly in some cases.

 Thanks.
Doesn't look like it. https://github.com/dlang/druntime/search?utf8=%E2%9C%93&q=rtInfo Remember rtInfo is per class definition, not instance. If you really need to modify rtInfo, don't do it directly. TypeInfo is meant to be read only. Do it via the RTInfo template[0] but that means modifying druntime. [0] https://github.com/dlang/druntime/blob/ce0f089fec56f7ff5b1df689f5c81256218e415b/src/object.d#L3230
Dec 14 2016