[ 
https://issues.apache.org/jira/browse/DISPATCH-1299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16799032#comment-16799032
 ] 

ASF subversion and git services commented on DISPATCH-1299:
-----------------------------------------------------------

Commit c47b976df339ea896b2ba5cf535b9bc07c13534c in qpid-dispatch's branch 
refs/heads/master from Ted Ross
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=c47b976 ]

DISPATCH-1299 - Added safe-reference feature to the alloc-pool module.
Note: alloc-malloc also has the same interface (will build), but does not 
provide the same safety.


> Provide API access to the already existing safe-reference capability in 
> alloc-pool
> ----------------------------------------------------------------------------------
>
>                 Key: DISPATCH-1299
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1299
>             Project: Qpid Dispatch
>          Issue Type: Improvement
>          Components: Container
>            Reporter: Ted Ross
>            Assignee: Ted Ross
>            Priority: Major
>             Fix For: 1.6.0
>
>
> This improvement adds the following two functions to the list of functions 
> generated per pooled type:
> {{typedef ... <typename>_sp;}}
> {{void set_safe_ptr(<typename> *p, <typename>_sp *sp);}}
> {{<typename> *safe_deref_<typename>(<typename>_sp sp);}}
> A user of this feature can declare or allocate a safe-pointer, set the 
> safe-pointer using a normal object pointer, and dereference the safe-pointer 
> later to yield the original normal pointer.  If, in the interim time, the 
> object was freed, the safe-dereference will yield a NULL pointer rather than 
> a stale (possibly re-used) pointer.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to