Memory Leaks in link list
<p>I have been working on this for days and I cannot find what why this is causing memory leaks? I'm new to C++, can someone please explain to me what I'm doing wrong. I continually call pop() untill the root node is null in the destructor until the list is empty this should call delete on the object.</p>

<pre><code> #pragma once

    template&lt;typename T&gt;
    class LinkList
    {
    public:
        class LinkNode
        {
        public:

            LinkNode() : next(nullptr)
            {

            }

            bool operator!=(LinkNode *a_node)
            {
                return (this-&gt;data != a_node-&gt;data);
            }

            bool operator==(LinkNode *a_node)
            {
                return (this-&gt;data == a_node-&gt;data);
            }

            void operator=(LinkNode *a_node)
            {
                this-&gt;data = a_node-&gt;data;
                this-&gt;next = a_node-&gt;next;
            }   

            T data;
            LinkNode* next;
        };

        class LinkIterator
        {

        public:
            LinkIterator(LinkNode* a_root) : node(a_root)
            {

            }

            ~LinkIterator()
            {

            }

            T&amp; operator*()
            {
                return this-&gt;node-&gt;data;
            }

            void operator++() //Prefix
            {
                this-&gt;node = this-&gt;node-&gt;next;
            }

            void operator++(int) //Postfix
            {
                this-&gt;node = this-&gt;node-&gt;next;
            }

            bool operator!=(LinkIterator a_linkIterator)
            {
                return (node != a_linkIterator.node);
            }

            bool operator==(LinkIterator a_linkIterator)
            {
                return (node != a_linkIterator.node);
            }

            LinkNode* node;
        };

        LinkList() : size(0), root(nullptr), lastNode(nullptr)  
        {

        }

        ~LinkList()
        {
            while (root != nullptr)
            {
                pop();
            }
        }

        LinkIterator begin()
        {
            return LinkIterator(root);
        }

        LinkIterator end()
        {
            return nullptr;
        }

        void push(T a_data)
        {
            LinkNode* node = new LinkNode;

            node-&gt;data = a_data;
            node-&gt;next = nullptr;

            if (lastNode != nullptr)
            {
                lastNode-&gt;next = node;
                lastNode = node;
            }
            else
            {
                root = node;
                lastNode = node;
            }

            size++;

        }

        void pop()
        {
            if (root-&gt;next == nullptr)
            {
                delete root;
                root = nullptr;
            }
            else
            {
                LinkNode *prevNode = root;

                while (prevNode-&gt;next != nullptr &amp;&amp; prevNode-&gt;next != lastNode)
                {
                    prevNode = prevNode-&gt;next;
                }

                delete lastNode;
                prevNode-&gt;next = nullptr;
                lastNode = prevNode;
            }

            if (size != 0)
                size--;

        }

        int getSize()
        {
            return size;
        }

        void push_front(T a_data)
        {
            LinkNode *node = new LinkNode;

            node-&gt;data = a_data;
            node-&gt;next = nullptr;

            if (root != nullptr)
            {
                node-&gt;next = root;
                root = node;
            }
            else
            {
                root = node;
                lastNode = node;
            }

            size++;

            node = nullptr;
        }

        void pop_front()
        {
            LinkNode *temp = root;
            root = root-&gt;next;
            delete temp;

            if (size != 0)
                size--;
        }

        void clear()
        {
            root = nullptr;
            size = 0;
        }

        bool empty()
        {
            return (size == 0);
        }

        T&amp; front()
        {
            return root-&gt;data;
        }

        T&amp; back()
        {
            return lastNode-&gt;data;
        }

        void insert(T a_data, unsigned int index)
        {
            if (index &lt;= size)
            {
                LinkNode* position = root;

                for (unsigned int i = 0; i &lt; index -1; i++)
                {
                    position = position-&gt;next;
                }

                LinkNode *node = new LinkNode;
                node-&gt;data = a_data;

                node-&gt;next = position-&gt;next;
                position-&gt;next = node;

            }
            else if(size == 0)
            {
                root-&gt;data = a_data;
            }
            else
            {
                push(a_data);
            }

        }

    private:
        unsigned int size;
        LinkNode* root;
        LinkNode* lastNode;
    };
</code></pre>