First chance exception at $0042766 f. exception class $C0000005 with message 'access violation at 0 x0042766f: write of address 0 x73300b44'. The Process CounterText_test. Exe (11356)
Write down the code under the form of FormCreate events, also did not carry out the related operation and any other code, pure is to define and release the variable
Will use the following way:
ClasseA * PA=new ClassA ();
Delete the PA;
In the following way is all right:
ClassA A;
What a great god help analyze how be to return a responsibility?
I tried it on other classes, useful not ah
CodePudding user response:
Development environment: Windows 7 XE6CodePudding user response:
Do you have in this ClassA code?CodePudding user response:
Is more complex, so it is posted, but theoretically the difference between two types of code should not too big ah, is to apply for a class, a manually through the delete release, a local variable is automatically released, I tried into the destructor will be is?CodePudding user response:
Are you delete the ClassA object later still use the object?CodePudding user response:
Find the problem, but I don't know whyI used to in ClassA STD: : string, just remove the this variable, tried and this variable has nothing to do with useless, as long as defined
CodePudding user response:
Strange, as long as the use of STD library things will appear this problemCodePudding user response:
The