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

  • SEARCH
  • Home
  • 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 1031781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T13:59:02+00:00 2026-05-16T13:59:02+00:00

I got my code like the following: class TimeManager { public: virtual ~TimeManager(); };

  • 0

I got my code like the following:

class TimeManager
{
public:
 virtual ~TimeManager();
};

class UserManager : virtual public TimeManager
{
public:
 virtual ~UserManager();
};

class Server : virutal public UserManager
{
 virtual ~Server();
};


CServer *pServer;

DWORD WINAPI ServerHelper(void*);

int main()
{
 //Create server
 CreateThread(NULL, 0, ServerHelper, NULL, 0, NULL);

 std::cin.get();

 //delete server
 delete pServer;

 std::cin.get();

 return 0;
}

DWORD WINAPI ServerHelper(void *v)
{
 pServer = new CServer;

 return 0;
}

My Problem is – guess – that my Server destructor won´t get called…

I can´t imagine, why:/… (I wrote output functions into all three classes and the server constructor does not output anything, but both of the other does… right after the SECOND! key-hit… (why the second and not right after the deletion?)

Any hints, tips, solutions?….

I am using visual studio 2010

  • 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-16T13:59:02+00:00Added an answer on May 16, 2026 at 1:59 pm

    Ok… I found the problems´ solution:

    I started the main loop from within the Servers constructor:

    Server::Server()
    {
    MainLoop();       // <- Loop in there...
    }
    

    I fixed it, by starting the server manually via an extra function and eveything is fine now :D…

    Thank You to everyone who participated:)…

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

Sidebar

Related Questions

I got the following code : public class PluginShape : INotifyPropertyChanged { private string
I've got code like that: <ul class=gallery_demo_unstyled> <li class=active><img src='001.jpg' /></li> <li><img src='002.jpg' /></li>
I've got an architecture like the following: Data (Class Library that handles our Entity
In a Silverlight project, I've got the following class defined. public class ThemeResource<T> {
I've got the following setup: public class SomeClass { private DirectoryEntry _root; private DirectorySearcher
Let's say that I got the following class and enum: public class MyModel {
Let say I got the following : public class A { [MyAttribute] public void
I've got the following classes: public class ObjectCollection : List<ObjectRow> { public Dictionary<int, ObjectRow>
I got this code: <div class=class1><a href=http://nvm/>text</a></div> CSS code of class1 is following: .class1
I have got code like this var challegneListener; $(document).ready(function(){ var challegneListener = setInterval(challengeListenerBot(),5000); });

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.