# AD Memory

**URL:** <https://forum.sierrawireless.com/t/ad-memory/5631>\
**Category:** Open AT\
**Created:** [May 30, 2012, 8:48am UTC](https://forum.sierrawireless.com/t/ad-memory/5631 "2012-05-30T08:48:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JSurf](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jsurf/32/2243_2.png) [@JSurf](https://forum.sierrawireless.com/u/JSurf)\
**Post date:** [May 30, 2012, 8:48am UTC](https://forum.sierrawireless.com/t/ad-memory/5631/1 "2012-05-30T08:48:34Z")

</div>

Hi All,

I have a few questions about AD Memory. More specifically cell ids.

I have been using the following code to retrieve the cell ids I have subscribed to.

wm\_lst\_t CellList;  
s32 listresult = adl\_adGetCellList ( &CellList );  
u16 count = wm\_lstGetCount(CellList);  
u32 last\_cell\_id = \*(u32 \*) wm\_lstGetItem(CellList, count - 1);

Is there a way to retrieve a list of the cell ids which have been deleted without trying to read data from a cell id to determine if it has been deleted?

Also, if I subscribe to a cell id, use it and then delete it, can I resubscribe to that cell id to use it for new data or do I have to recompact before using it?

Thanks!

---

<div class="post-metadata">

**Author:** ![JSurf](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jsurf/32/2243_2.png) [@JSurf](https://forum.sierrawireless.com/u/JSurf)\
**Post date:** [May 30, 2012, 1:48pm UTC](https://forum.sierrawireless.com/t/ad-memory/5631/2 "2012-05-30T13:48:33Z")

</div>

Ok, I have discovered a few things today to do with this.

I can subscribe to a cell id, write to it, delete it, then resubscribe to that cell id and write to it again and then delete it.  
What I did notice is that if I get the state after the first iteration, the number of objects is 1 and the number of deleted is 1. The free memory obviously also decrements too.  
If I then run the second iteration (subscribe to the same cell id and delete), the number of object is now 2 and the number deleted is 2. The free memory decrements again, so re-using this cell id doesn’t seem to use the same memory.
