Skip to content
This repository has been archived by the owner on Mar 29, 2019. It is now read-only.

Memoryleak (every new instance?) #7

Closed
jkuchar opened this issue Jul 12, 2013 · 2 comments
Closed

Memoryleak (every new instance?) #7

jkuchar opened this issue Jul 12, 2013 · 2 comments
Labels

Comments

@jkuchar
Copy link

jkuchar commented Jul 12, 2013

It looks it's the same problem like there: http://stackoverflow.com/a/4499817

PHP installation: (win x64)
PHP 5.3.8 (cli) (built: Aug 23 2011 12:14:39)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies

Just try to keep running this code:

// Let bootstrap create Dependency Injection container.
$container = require __DIR__ . '/app/bootstrap.php';

$checkUrl = "http://www.google.com";

do{
    $request = new Kdyby\Curl\Request($checkUrl);
    $res = $request->get();
    unset($request,$res);
    sleep(1);

} while(true); // indefinite loop

(after one day this grows in more than 60 mb in memory)

probably is there problem with the CURLOPT_RETURNTRANSFER as described at stackoverflow. And I know that this is PHP bug, but actually I think this addon could overcome PHP bug just like Nette do.

Thank you very much! Jan

@fprochazka
Copy link
Member

Thanks for reporting, I'm going to do something about it, I just don't what, yet :)

@mishak87
Copy link
Contributor

mishak87 commented Feb 1, 2014

just to be fair test should have gc_collect_cycles();

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants