$entity = new Entity(...);
$this->entityManager->persist($entity);
if ($i % 10 == 0) {
$this->entityManager->flush();
$this->registry->reset();
foreach ($this->registry->getConnections() as $connection) {
$connection->close();
}
}
gc_collect_cycles();
@WebServlet("/test")
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) {
var headerNames = request.getHeaderNames();
var hello = "Hello world!";
var i = 0;
}
}
@WebServlet("/test")
public class TestServlet extends HttpServlet {
public void doGet(HttpServletRequest request, HttpServletResponse response) {
Enumeration<String> headerNames = request.getHeaderNames();
String hello = "Hello world!";
int i = 0;
}
}