| Openbravo Issue Tracking System - POS2 | 
| View Issue Details | 
| 
 | 
| ID | Project | Category | View Status | Date Submitted | Last Update | 
| 0050762 | POS2 | POS | public | 2022-11-03 23:41 | 2022-11-07 17:47 | 
| 
 | 
| Reporter | AugustoMauch |  | 
| Assigned To | Retail |  | 
| Priority | normal | Severity | major | Reproducibility | have not tried | 
| Status | closed | Resolution | fixed |  | 
| Platform |  | OS | 5 | OS Version |  | 
| Product Version |  |  | 
| Target Version | 22Q4.1 | Fixed in Version | 22Q4 |  | 
| Merge Request Status | approved | 
| Review Assigned To |  | 
| OBNetwork customer | No | 
| Support ticket |  | 
| Regression level |  | 
| Regression date |  | 
| Regression introduced in release |  | 
| Regression introduced by commit |  | 
| Triggers an Emergency Pack | No | 
| 
 | 
| Summary | 0050762: Memory leak in Carousel.jsx - DOM event listeners are not being removed | 
| Description | The Carousel.jsx component has a memory leak because it is registering DOM events on a useEffect hook but is never unregistering them. 
 The useEffect hook should return a function that will be invoked when unmounting the component and that will unregister the DOM events
 | 
| Steps To Reproduce | See the code here [1], it is adding two event listeners but never removing them. It should removee them like it is done here [2] 
 [1] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/Carousel/Carousel.jsx#L66 [^]
 [2] https://gitlab.com/openbravo/product/pmods/org.openbravo.core2/-/blob/master/web-jspack/org.openbravo.core2/src/components/DrawerMenu/DrawerMenuGroup.jsx#L250 [^]
 | 
| Proposed Solution |  | 
| Additional Information |  | 
| Tags | No tags attached. | 
| Relationships | | blocks | defect | 0050727 |  | closed | Retail | Memory leak in Carousel.jsx - DOM event listeners are not being removed | 
 | 
| Attached Files |  | 
| 
 | 
| Issue History | 
| Date Modified | Username | Field | Change | 
| 2022-11-07 16:00 | guilleaer | Type | defect => backport | 
| 2022-11-07 16:00 | guilleaer | Target Version | => 22Q4.1 | 
| 2022-11-07 17:23 | hgbot | Note Added: 0143177 |  | 
| 2022-11-07 17:47 | hgbot | Merge Request Status | open => approved | 
| 2022-11-07 17:47 | hgbot | Resolution | open => fixed | 
| 2022-11-07 17:47 | hgbot | Status | scheduled => closed | 
| 2022-11-07 17:47 | hgbot | Note Added: 0143179 |  | 
| 2022-11-07 17:47 | hgbot | Fixed in Version | => 22Q4 | 
| 2022-11-07 17:47 | hgbot | Note Added: 0143180 |  |