Destruction of CDocData before returning it

Discussion in 'AutoCAD' started by TimD, Jan 23, 2004.

  1. TimD

    TimD Guest

    Currently i'm moving global document dependent data to the CDocData
    class. This class currently contains one public member, just a simple
    interger named test.

    When refering to this member, using the simple line of code
    'DocVars.docData().test = 1;' AutoCad crashes, stepping through the
    code using debug mode made us conclude that somewhere in de std::map
    the CDocData class gets de-structed before it was even returned.

    Are you familiar with this problem? If so is there a bug fix ? If not
    is there an other possible way to make sure the CDocData objects only
    get destructed when the 'documentToBeDestroyed( AcApDocument *pDoc )'
    method is called from the AsdkDataManager reactor
     
    TimD, Jan 23, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.