Skip to content

Instantly share code, notes, and snippets.

@mikelbring
Created December 2, 2015 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikelbring/412bba27a5792a814a05 to your computer and use it in GitHub Desktop.
Save mikelbring/412bba27a5792a814a05 to your computer and use it in GitHub Desktop.
<?php
// Will this cause a memory leak?
// Will a new instance of ObjectClass stay in memory each iteration?
// If I attach it to a variable will it replace the old memory pointer?
foreach ($a as $k) {
new ObjectClass($k);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment