Project

Profile

Help

Revision 00082f6f

Added by O'Neil Delpratt 8 months ago

Saxon/C bug fixes

View differences:

src/main/c/Saxon.C.API/XdmItem.cpp
14 14

  
15 15

  
16 16
XdmItem::XdmItem(jobject obj){
17
	value = obj;
17
	value = SaxonProcessor::sxn_environ->env->NewGlobalRef(obj);
18 18
	xdmSize =1;
19 19
	refCount =0;
20 20
}
......
97 97
XdmItem::~XdmItem() {
98 98
    decrementRefCount();
99 99
    std::cerr<<std::endl<<"XdmItem destructor called, refCount"<<getRefCount()<<std::endl;
100
    std::cout << std::endl << "cpp0-1" << std::endl;
101
    SaxonProcessor::sxn_environ->env->ExceptionDescribe();
102

  
100 103
    if(getRefCount()<1){
101 104
        if(value !=nullptr && SaxonProcessor::jvmCreatedCPP>0) {
102 105
            SaxonProcessor::sxn_environ->env->DeleteGlobalRef(value);
103 106
        }
104

  
107
        std::cout << std::endl << "cpp0-1" << std::endl;
108
        SaxonProcessor::sxn_environ->env->ExceptionDescribe();
105 109
        if(stringValue.empty()) {
106 110
            stringValue.clear();
107 111
        }

Also available in: Unified diff