A
andrerus
Hi. I've developed an application for Windows Mobile using 3.5 version
of CompactFramework.
My application generally uses (into the heap) approximately 7kB. Then
I decided to introduce a XML configuration feature, but now it needs
nearly 80kB!!!
Looking at the heap, I found a 64kB sized array allocated by the
constructor of XmlTextReader (used inside XmlDocument). The problem is
that, even if I close XmlTextReader or set to null my ConfiguratorObj,
and then do a GC.Collect(), that array isn't deallocated.
Looking at rotor sources, I found that the array is
private static byte* s_CharProperties;
of XmlCharType, that is setted to
new byte[CharPropertiesSize]
where
private const uint CharPropertiesSize = (uint)char.MaxValue + 1;
I can't understand what this array is and what it contains, so I can't
understand if this allocation is useful and normal, but I'd like to
continue using XML to configure my application without spend so much
memory.
Does anybody help me explaining what happens or also suggesting
different solution.
Andrea
of CompactFramework.
My application generally uses (into the heap) approximately 7kB. Then
I decided to introduce a XML configuration feature, but now it needs
nearly 80kB!!!
Looking at the heap, I found a 64kB sized array allocated by the
constructor of XmlTextReader (used inside XmlDocument). The problem is
that, even if I close XmlTextReader or set to null my ConfiguratorObj,
and then do a GC.Collect(), that array isn't deallocated.
Looking at rotor sources, I found that the array is
private static byte* s_CharProperties;
of XmlCharType, that is setted to
new byte[CharPropertiesSize]
where
private const uint CharPropertiesSize = (uint)char.MaxValue + 1;
I can't understand what this array is and what it contains, so I can't
understand if this allocation is useful and normal, but I'd like to
continue using XML to configure my application without spend so much
memory.
Does anybody help me explaining what happens or also suggesting
different solution.
Andrea