Store references to other types inside a type class

Sven Brauch svenbrauch at googlemail.com
Fri Jun 17 20:01:52 UTC 2011


Hi all, especially David,

I'm trying to create a type for a "list" object, which has some
properties from StructureType, but additionally has a "Content Type",
which is an AbstractType identifying the type of data stored in the
list. I got something which works quite okay, however, it stores
AbstractType::Ptr instances inside the data class. This does not seem
to be a good idea, because as soon as I restart KDevelop, I get random
crashes. I guess this is because the location of the type objects
changes, and then the AbstractType::Ptr objects from the data class
point to some random memory (I didn't think about that earlier...).
What would be the correct solution for that problem? Store the types
based on their index, or such?

Thanks,
Sven




More information about the KDevelop-devel mailing list