What is the reasons that memory leakage can happen ??can some one explain briefly

if possible explain with real-time scenario 

Thanks 

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The true definition of a Memory Leak is very specific, and it specifically refers to situations where memory is allocated to a resource, and then the resource is lost but memory still allocated, such that the memory cannot be recovered without shutting down the whole application / rebooting the computer.  Using a lot of memory isn't a leak per se, it's just using a lot of memory.  To be a leak, it has to be impossible for the application, at least without help from an Admin, to get the memory freed up again.

    Memory leaks are the bane of developers in much lower level languages than Appian, like C++. Appian runs in Java which has a garbage collector to handle most memory management issues.  That said, it is possible to overcome the garbage collector.  Memory leaks are a highly advanced topic in memory management and generally not something we think about as Appian developers.  We rely on the Appian platform to not leak memory. 

    The closest thing I could think of on Appian is a process model that calls itself as a sub-process (you can do that) in a neverending chain of synchronous subprocesses, such that every instance remains in memory waiting on all the instances that follow.  No processes could ever archive.  Maybe processes that are configured such that they can't be completed, say a Quick Task with no timer and broken activity chain so the user can't ever be assigned the Quick Task and process can't complete until the Quick Task is done.  That could be considered a memory leak. There might be some other terrible designs to try to make Appian leak memory.

Reply
  • 0
    Certified Lead Developer

    The true definition of a Memory Leak is very specific, and it specifically refers to situations where memory is allocated to a resource, and then the resource is lost but memory still allocated, such that the memory cannot be recovered without shutting down the whole application / rebooting the computer.  Using a lot of memory isn't a leak per se, it's just using a lot of memory.  To be a leak, it has to be impossible for the application, at least without help from an Admin, to get the memory freed up again.

    Memory leaks are the bane of developers in much lower level languages than Appian, like C++. Appian runs in Java which has a garbage collector to handle most memory management issues.  That said, it is possible to overcome the garbage collector.  Memory leaks are a highly advanced topic in memory management and generally not something we think about as Appian developers.  We rely on the Appian platform to not leak memory. 

    The closest thing I could think of on Appian is a process model that calls itself as a sub-process (you can do that) in a neverending chain of synchronous subprocesses, such that every instance remains in memory waiting on all the instances that follow.  No processes could ever archive.  Maybe processes that are configured such that they can't be completed, say a Quick Task with no timer and broken activity chain so the user can't ever be assigned the Quick Task and process can't complete until the Quick Task is done.  That could be considered a memory leak. There might be some other terrible designs to try to make Appian leak memory.

Children
No Data