diff options
author | Noel Grandin <noel@peralex.com> | 2014-09-30 16:13:47 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-10-02 13:00:08 +0200 |
commit | d8be5a55760b01efa32708411c6e47fe74600edc (patch) | |
tree | 6edf19752904f90dd348d3cbb9a16d6391b58b60 /include/uno | |
parent | javaunohelper: More robust way to wait for finalization (diff) | |
download | core-d8be5a55760b01efa32708411c6e47fe74600edc.tar.gz core-d8be5a55760b01efa32708411c6e47fe74600edc.zip |
optimise UNO Sequence destructor
to avoid expensive function calls until the refcount reaches 0
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, slightly changing it to
add a uno_type_sequence_destroy to uno/sequence2.h instead of a
uno_type_destructSequence to uno/data.h.
Change-Id: I3bbff3294f2b515fc3c68c4c6c1cb16829f5cc44
Diffstat (limited to 'include/uno')
-rw-r--r-- | include/uno/sequence2.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/uno/sequence2.h b/include/uno/sequence2.h index 42208f0f8bab..3b55ba007cf1 100644 --- a/include/uno/sequence2.h +++ b/include/uno/sequence2.h @@ -172,6 +172,20 @@ CPPU_DLLPUBLIC sal_Bool SAL_CALL uno_type_sequence_realloc( uno_ReleaseFunc release ) SAL_THROW_EXTERN_C(); +/** Destroy a sequence whose reference count has dropped to zero. + + @param sequence must be non-null, sequence->nRefCount must be zero + @param type the type of the sequence, must be non-null + @param release function called each time an interface needs to be release, + must be non-null + + @since LibreOffice 4.4 +*/ +CPPU_DLLPUBLIC void SAL_CALL uno_type_sequence_destroy( + uno_Sequence * sequence, struct _typelib_TypeDescriptionReference * type, + uno_ReleaseFunc release) + SAL_THROW_EXTERN_C(); + #ifdef __cplusplus } #endif |