Category: Proxy usage

Q

Are proxy types exception-safe?

A

Yes, they are. A proxy instance wraps around a Java object reference. When the proxy instance is destructed, the Java object reference is released. It does not matter whether the destruction takes place due to the object going out of scope normally or because an exception was thrown.

This is one of the advantages of using proxy types rather than JNI utilty types. The proxy types take advantage of the C++ object lifecycle management to make sure that no Java object references are being leaked.


Copyright 2006-2011 by Codemesh, Inc., ALL RIGHTS RESERVED

:
frequently asked questions
home products support customers partners newsroom about us contact us