Top "Lifetime" questions

A variable's life-time is the time during which the variable is bound to a specific memory location.

setting and extending Session Lifetime using Zend_Auth

i use Zend_Auth for one of my Projects, but so far haven't figured out how to set the Lifetime …

php zend-framework session zend-auth lifetime
What are non-lexical lifetimes?

Rust has an RFC related to non-lexical lifetimes which has been approved to be implemented in the language for a …

rust lifetime lifetime-scoping
How do I specify lifetime parameters in an associated type?

I have this trait and simple structure: use std::path::{Path, PathBuf}; trait Foo { type Item: AsRef<Path>; …

rust lifetime
What should be the lifetime of an NHibernate session?

I'm new to NHibernate, and have seen some issues when closing sessions prematurely. I've solved this temporarily by reusing sessions …

.net nhibernate session lifetime
What is the lifetime of class static variables in C++?

If I have a class called Test :: class Test { static std::vector<int> staticVector; }; when does staticVector get …

c++ static-members lifetime
How to declare a lifetime for a closure argument?

I would like to declare a lifetime for a closure in Rust, but I can't find a way to add …

closures rust lifetime
How to initialize a variable with a lifetime?

I have following code and don't know how to get it working: fn new_int<'a>() -> &…

rust lifetime
C++ constant reference lifetime (container adaptor)

I have code that looks like this: class T {}; class container { const T &first, T &second; container(const …

c++ reference constants lifetime
How can I pass a reference to a stack variable to a thread?

I'm writing a WebSocket server where a web client connects to play chess against a multithreaded computer AI. The WebSocket …

multithreading rust reference lifetime
Using a `let` binding to increase a values lifetime

I wrote the following code to read an array of integers from stdin: use std::io::{self, BufRead}; fn main() { …

rust lifetime let