-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: Laravel
-
Not Needed
-
raducorcan has created Issue #2959: Memory leak when setting nested keys using dot notation in laravel-mongodb. This Jira ticket was filed by GromNaN
Issue Text:
- Laravel-mongodb Version: 4.3.0
- PHP Version: 8.3
- Database Driver & Version: 1.15.0 & 5.0
Description:
There appears to be a memory leak when setting nested keys using dot notation. I am attaching a very simple code snippet that exemplifies the issue.
Steps to reproduce
```
class A extends \MongoDB\Laravel\Eloquent\Model {};
$a = new A;
for ($i = 0; $i < 100; $i++)
//----------------------------------
class A extends \MongoDB\Laravel\Eloquent\Model {};
$a = new A;
for ($i = 0; $i < 100; $i++)
```
Expected behaviour
Script memory usage keeps increasing.
Actual behaviour
The memory usage should remain constant.