Opened 16 years ago

Closed 12 years ago

#66 closed Feature Requests (Wont Fix)

thread specific pointer behavior change

Reported by: nobody Owned by: Roland Schwarz
Milestone: Component: None
Version: None Severity:
Keywords: Cc:


The thread specific pointer class seems to imply that only heap allocated pointers are eligible 
for use in the thread specific pointer (i.e. both reset and cleanup use delete object).

Is it possible to make the cleanup action declarable in the template such that we have someting 
along the likes of:

template <typename T, typename Cleanup>
class ... {
	reset(T *new) { ... cleanup(cur);.... }

	cleanup(void *cur) {
		Cleanup c;


or some such.

This would allow the use of say reference counted or even stack objects to be used in thread 
local pointers.

Attachments (0)

Change History (1)

comment:1 Changed 12 years ago by Roland Schwarz

Status: assignedclosed
Logged In: YES 

I don't think anything than heap located pointers should be
An useful counter example would be interesting.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Roland Schwarz.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.