[omniORB] exception (2) client code fragment
Lolke B. Dijkstra
omniorb at dijkstra-ict.com
Sun Jan 8 13:37:08 GMT 2006
OK. The destruction works fine now after having changed the compiler
settings to enable runtime type information.
Is this what should be expected?
Lolke B. Dijkstra wrote:
> To make it more clear here is the client code fragment:
>
> try {
> dicom::patient::PN_var patient = ipatient->getName( oid );
> cerr << patient.in() << endl;
> }
> catch( dicom::ObjectNotFound& e ) {
> cerr << "error" << endl;
> }
>
> further down somewhere the SystemException gets caught.
>
> There is however another thing that seems different from what I've
> learnt.
> At the end of the try block (after printing the patient) the program
> crashes (using the code I show here) that's why I modified it to
>
> dicom::patient::PN* patient = ipatient->getName( oid );
> cerr << patient << endl;
>
> which works fine. That seems strange. I receive a reference to a new
> object and take responsibility for deleting it by using the var.
> That's what it should be, right?
>
> Some additional info:
> I work with VS 7.1
> Memory model /MD resp. /MDd for both client and server.
>
> Does somebody have a clue? It would be greatly appreciated.
>
>
>
> _______________________________________________
> omniORB-list mailing list
> omniORB-list at omniorb-support.com
> http://www.omniorb-support.com/mailman/listinfo/omniorb-list
>
>
>
> __________ NOD32 1.1355 (20060106) Information __________
>
> This message was checked by NOD32 antivirus system.
> http://www.eset.com
>
>
>
More information about the omniORB-list
mailing list