Search code examples
ewam

Referencing the killed object


I am getting the following error. Can somebody help?

aICCNTRequiredRenewalQuestionnaire has a list of aICCNTRRQPolicyInfo
W:\wide\WideDll\WREFTO.CPP aReftoType..GarbageMarkFrom MajorError BATCHUSER ** no object ** ** no object **
aICCNTRRQPolicyInfo Add =2E7D:63A0 NSId = 0 Id = 0 Version = 2147483647 referencing the killed object with type <_RefMyRequireRenewalQuestionnaire0aICCNTRRQPolicyInfo>


Solution

  • This usually happens when you cancel the main object and do not cancel the listOf object linked to it.

    Check if the class aICCNTRequiredRenewalQuestionnaire has be been cancelled anywhere in the code.

    Example :

    • Check for similar code shown below. Note pRenewalQuestionnaire is a variable type of class aICCNTRequiredRenewalQuestionnaire.

    pRenewalQuestionnaire.CancelObject(pRenewalQuestionnaire)

    • Need to verify whether listOf of class aICCNTRRQPolicyInfo has been cancelled too.

    So the solution would be to first cancel all the listOf object and then cancel the main object.

    forEach theRRQPolicyInfo in pRenewalQuestionnaire.MyRRQPolicyInfo
    
       theRRQPolicyInfo.CancelObject(theRRQPolicyInfo)
    
    endFor
    
    pRenewalQuestionnaire.CancelObject(pRenewalQuestionnaire)