String Literal address across translation units [duplicate]

You can not rely on identical string literals having the same memory location, it is an implementation decision. The C99 draft standard tells us that it is unspecified whether the same string literal are distinct, from section 6.4.5 String literals: It is unspecified whether these arrays are distinct provided their elements have the appropriate values. … Read more

C# Object Pooling Pattern implementation

This question is a little trickier than one might expect due to several unknowns: The behaviour of the resource being pooled, the expected/required lifetime of objects, the real reason that the pool is required, etc. Typically pools are special-purpose – thread pools, connection pools, etc. – because it is easier to optimize one when you … Read more