Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Memory leaks fixed #30

Merged
merged 1 commit into from
Mar 3, 2022
Merged

Memory leaks fixed #30

merged 1 commit into from
Mar 3, 2022

Conversation

KoudelkaB
Copy link
Contributor

No description provided.

@MartinKoeditz
Copy link
Collaborator

@KoudelkaB Do you have an example code for the leak? In that case we can create a unit test.

@KoudelkaB
Copy link
Contributor Author

The code to reproduce the leak is very simple:
for ($idx = 1; $idx <= 2000; $idx++) {
$h = @ibase_prepare('SELECT * FROM DATASTORE');
$result = ibase_execute($h);
ibase_free_result($result);
ibase_free_query($h);

        unset($h);
        unset($result);

        if ($idx % 100 === 0) {
            echo CONSOLE(
                sprintf(
                    "Queries executed: %d. Memory: %s\n",
                    $idx,
                    Benchmark::getMemoryPeakUsage(true)
                )
            );
        }
    }

@MartinKoeditz MartinKoeditz merged commit b6c2883 into FirebirdSQL:master Mar 3, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants