# AlarmNotification - Profile not unloaded on restart

**URL:** <https://forum.inductiveautomation.com/t/alarmnotification-profile-not-unloaded-on-restart/7644>\
**Category:** Module Development\
**Created:** [November 30, 2013, 12:18pm UTC](https://forum.inductiveautomation.com/t/alarmnotification-profile-not-unloaded-on-restart/7644 "2013-11-30T12:18:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chi](https://avatars.discourse-cdn.com/v4/letter/c/0ea827/32.png) [@chi](https://forum.inductiveautomation.com/u/chi)\
**Post date:** [November 30, 2013, 12:18pm UTC](https://forum.inductiveautomation.com/t/alarmnotification-profile-not-unloaded-on-restart/7644/1 "2013-11-30T12:18:31Z")

</div>

Hi,

while implementing an NotificationProfile i discovered a potential memory leak when restarting a notification profile.  
After a change in the profile settings, the profile is correctly shutdown and restarted, but the old profile instance is not gc’ed. The debugger says that it is still referenced from AlarmNotificationManagerImpl#profilesByTypeId. Only way to delete this references is to restart the complete module.

Do i have to unregister the profile somewhere on shutdown, or is this a bug in the api?

Regards,  
Carsten

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [December 4, 2013, 10:51pm UTC](https://forum.inductiveautomation.com/t/alarmnotification-profile-not-unloaded-on-restart/7644/2 "2013-12-04T22:51:44Z")

</div>

I think this is a bug. Thanks for reporting ![:thumb_left:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e26afb081ddde6df016df6ee49159cf56aaca688.gif ":thumb\_left:")
