Opened 17 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.

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.
Note: See TracTickets for help on using tickets.