Description
Memory leak occurs when using transition_in and transition_out properties on DivKit elements. After navigating away from a screen with rendered DivKit content that contains these animation properties, multiple DivKit classes remain in memory and are not deallocated.
Steps to Reproduce
- Create a DivKit view with elements that have
transition_in and transition_out properties configured
- Render the DivKit content on a screen
- Navigate away from the screen (dismiss/pop the view controller)
- Monitor memory using Xcode Memory Graph Debugger or Instruments
Expected Behavior
All DivKit-related objects should be deallocated when the view controller is dismissed and no longer in use.
Actual Behavior
Multiple DivKit classes remain in memory after the screen is dismissed. The objects are not released, causing a memory leak.
Sample JSON
The leak can be reproduced with the following DivKit JSON configuration:
https://gist.github.com/pr1k0l/08843edf8d8a944e21d79467156d6694
Key elements causing the issue:
{
"type": "gallery",
"id": "animated_gallery",
"transition_in": {
"type": "fade",
"duration": 2000
},
"transition_out": {
"type": "scale",
"duration": 2000
},
"visibility": "@{ variable_2_1_1 }",
"items": [...]
}
Environment
- Platform: iOS
- DivKit version: 32.6.0 – 32.34.0
- Xcode version: 26.1.1
- iOS version: 26.1
Additional Notes
The memory leak only appears when transition_in and/or transition_out properties are present. Removing these properties resolves the issue, and the DivKit objects are properly deallocated.
Description
Memory leak occurs when using
transition_inandtransition_outproperties on DivKit elements. After navigating away from a screen with rendered DivKit content that contains these animation properties, multiple DivKit classes remain in memory and are not deallocated.Steps to Reproduce
transition_inandtransition_outproperties configuredExpected Behavior
All DivKit-related objects should be deallocated when the view controller is dismissed and no longer in use.
Actual Behavior
Multiple DivKit classes remain in memory after the screen is dismissed. The objects are not released, causing a memory leak.
Sample JSON
The leak can be reproduced with the following DivKit JSON configuration:
https://gist.github.com/pr1k0l/08843edf8d8a944e21d79467156d6694
Key elements causing the issue:
{ "type": "gallery", "id": "animated_gallery", "transition_in": { "type": "fade", "duration": 2000 }, "transition_out": { "type": "scale", "duration": 2000 }, "visibility": "@{ variable_2_1_1 }", "items": [...] }Environment
Additional Notes
The memory leak only appears when
transition_inand/ortransition_outproperties are present. Removing these properties resolves the issue, and the DivKit objects are properly deallocated.