Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6980479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:01:26+00:00 2026-05-27T18:01:26+00:00

I have my customize Map Class template <class TKey, class TVal> class CLSimpleMap{}; typedef

  • 0

I have my customize Map Class

template <class TKey, class TVal> class CLSimpleMap{};


typedef CLSimpleMap<DNSServiceRef/* Descriptor*/,int/*socket*/> ClientSocketMap;                    

I am Enumerating the Wifi Device using Bonjour Api.

I have Two Thread

Main thread:

  1. Adding Decriptor and Socket in the map ClientSocketMap when Bonjour api callback return socket and descriptor for processing.
  2. I am deleting the entry when socket doesn’t have data to receive

Callback Processing Thread:

  1. I am doing select to check socket has something and then pushing the Bonjour callback.

  2. I am using Crtical section to perform the addition and deletion on ClientSocketMap

But to my surprise it showing Heap corruption on Callback Processing Thread when it tries to Index the Descriptor ClientSocketMap .

I dont Understand ,Why I am getting this error.Is this due to thread?
Help me to resolve the problem.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:01:27+00:00Added an answer on May 27, 2026 at 6:01 pm

    Check operator==() in DNSServiceRef implementation
    Also this class implementation based on array and every time you add new element some old elements will be moved. Maybe you use old pointers. After each “add” your’s pointers invalidated

    MSDN: Each key and value pair added causes the mapping array memory to be freed and reallocated, in order to ensure the data for each is always stored contiguously.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class A that inherits UITableViewCell (to customize a table cell). It
I am using MVC 3 and have a customize model class to apply the
I have a requirement in my application map page. I have to customize the
Does any one have tried to customize default section index displayed in UITableView. I
I have a 1920x1200 screen an would like to customize VS2008 code windows to
We have a web portal product from which we customize portals from customers. We
I have mp3 catalog portal and I want to customize my urls. I used
Is it possible to customize a django application to have accept localized date format
I have tons of ajax components on this booking engine. I need to customize
In Eclipse IDE how do you customize the Java code style formatter to have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.