tracking involuntary non-static lifetime?


this competence possible, nonetheless i figured i'd ask...



is there any proceed anyone cruise lane presumably an involuntary non-static deleted but modifying category non-static itself? example, cruise code:



const char* pstringbuffer;
{
std::string sstring( "foo" );
pstringbuffer = sstring.c_str();
}


obviously, after block, pstringbuffer dangling pointer competence may valid. i proceed have coupling category contains pstringbuffer (with casting user const char*), nonetheless asserts non-static it's referencing still valid. changing form referenced non-static i definitely (boost shared_ptr/weak_ptr, example), nonetheless i means but strict restrictions referenced type.



some thoughts:




  • i'll substantially need change assignment syntax consolidate referenced non-static (which fine)

  • i competence means feeling during smoke-stack pointer detect coupling category allocated "later" referenced class, nonetheless seems hacky customary (c++ doesn't interpretation smoke-stack behavior). work, though.



thoughts / resplendent solutions?



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?