Removal of FdoPtr Null check

1 message Options
Embed this post
Permalink
Carsten Hess

Removal of FdoPtr Null check

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi,

 

We have been doing some research inside of Autodesk on one aspect of the current FdoPtr implementation. The definition of this smart pointer contains a NULL check that throws an Fdo exception if a NULL pointer is accessed. This is a behavior unlike any other smart pointer implementation we are aware of at this point.

 

While this check does provide some help in keeping programs based on FDO more stable it has a variety of problems associated with it. Most prominently it increases DLL sizes quite a bit due to in-lining of the FdoPtr method and has a small negative performance impact on our applications. Also, the way it is used today this code can potentially create memory corruption as the exception could be thrown by the FDO dll while the destruction of the exception happens in the application code.

 

With that I would like to propose that we remove this NULL check and recommend that applications implement the operating system exception handler for accessing invalid memory. This would then handle all NULL pointer accesses and not just FDO null pointer access.

 

What do you all think about this?

 

Cheers,

  Carsten


_______________________________________________
fdo-internals mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fdo-internals