jQuery UI Widgets Forums Angular jqxDateTimeInput and jqxCalendar memory leak

This topic contains 5 replies, has 5 voices, and was last updated by  Peter Stoev 7 years, 5 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author

  • maufarinelli
    Participant

    Hi,

    We are using jqxDateTimeInput in our application. But we’ve just realised that it is causing a memory leak.
    We are using inside a modal component, and when it is destroyed, the jqxDateTimeInput is detroyed just after and rowser keep a Detached DOM tree of it in memory.

    Ok, we fixed that explicitely calling self.settings.jqxDateTimeInput(‘destroy’);, but we still have some Detached DOM tree of its jqxCalendar that is instantiated by jqxDateTimeInput.

    Do we have a way to have access to the jqxCalendar instance created internally by jqxDateTimeInput?
    if yes, we could destroy it by ourselves. However, I think you guys could improve it forcing to destroy the scope of its calendar instance once it is destroyed too.

    Thanks


    Peter Stoev
    Keymaster

    Hi maufarinelli,

    It is not a memory leak, because you have to call “destroy” method to destroy the component. The “destroy” method of jqxDateTimeInput destroys the calendar as well.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/


    achiesa
    Participant

    I would say it is, indeed, a bug.
    The Angular jqxSliderComponent doesn’t implement OnDestroy interface.

    It should, and should call the ‘destroy’ method of the underlying widget by itself.
    It is his responsibility to do so.

    AFAICT, every Angular component provided that wraps a widget whould implement an OnDestroy method.


    Ivo Zhulev
    Participant

    Hi achiesa,

    Thanks for the feedback.

    Best Regards,
    Ivo

    jQWidgets Team
    http://www.jqwidgets.com/


    sjaan10
    Participant

    Hi,

    We are using jqxWidget components for a long time and now we realized that jqxDateTimeInput and JqxCalender both has memory leaks. It is accumulating approx 620kb memory every in our application. so we tried to destroy both manually but that does not work as well. it still have the large number of detached nodes and even memory size grows.

    Here is the running sample of the memory leak use case https://jsfiddle.net/skhajan/24eamneg/.

    Thanks
    Khajan Singh


    Peter Stoev
    Keymaster

    When “destroy” is called, memory occupied by jqxDateTimeInput and Calendar is released when the GC is called.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.