This is the skeleton of my app.
1 2 3 4 5
|
- ClassA has a ClassE * myclassE_inside_A public var.
- ClassB Inherits ClassD
- ClassC Inherits ClassD
- ClassD has some funtions and *ClassE public var.
|
The idea was to deal with classE instance from class A, B and C. And use some common methods of ClassD from ClassB and ClassC.
Pseudocode that describes its operation.
1 2 3 4 5 6 7 8 9 10 11 12
|
Inside ClassA:
ClassB my_classB;
my_classB.create; (I have the *ClassE filled with data )
myclassE_inside_A = my_classB.classE;
ClassC my_classC;
ClassC.set_classE(my_classE_insideA);
for( )
{ do some things with my_classE_inside_A ;
classC.modify_some_things_on_classE }
- classC.modify_some_things_on_classE uses own methods and one function inheritated from classD.
|
When I run the program I have a lot a heap error and a lot of crahes
HEAP: Free Heap block c977e28 modified at c977e5c after it was freed
(Internal error: pc 0x2ff in read in psymtab, but not in symtab.)
(Internal error: pc 0x2ff in read in psymtab, but not in symtab.)
(Internal error: pc 0x2ff in read in psymtab, but not in symtab.)
,,,,
The error was related with classC, after the first modification of classE object. the second time I use it (it is the same if I do it from myclassE_insideA or int classC) i have the crash.
I'm sure that I' forget to do something but I dont view it.
It is as If I can't use the classE object by pointer. ?
Any idea ?