In reply to adnanesbai:
Adnane,
Indeed it is the “ref” issue that is causing this. You should do the item = item_type::type_id::create() inside your forever loop.
BTW - please use tags to format your code in these posts, makes it easier to read, follow.
Regards
Srini