Skip to content

Heap error after sync_close #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pkwong4321 opened this issue Jun 24, 2015 · 1 comment
Closed

Heap error after sync_close #30

pkwong4321 opened this issue Jun 24, 2015 · 1 comment

Comments

@pkwong4321
Copy link

Based on the console example, I get
HEAP: Free Heap block 00E7A590 modified at 00E7ACC8 after it was freed
in visual studio after the main program block ends, did i miss something for cleanup?
Here is my code:

sio::client client;
connection_listener listener(client);

client.set_open_listener(std::bind(&connection_listener::on_connected, &listener));
client.connect("http://chat.socket.io");

g_lock.lock();
if (!g_connected)
    g_cond.wait(g_lock);
g_lock.unlock();

Sleep(1000);

client.sync_close();
client.clear_con_listeners();
@pkwong4321
Copy link
Author

it's fine after i comment
m_client->remove_socket(m_nsp);
in void socket::impl::on_close()
probably that frees the object and some timers are still running?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant