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 8964115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:30:48+00:00 2026-06-15T16:30:48+00:00

I have quite a few source files in nested subfolders for a project. I

  • 0

I have quite a few source files in nested subfolders for a project. I have 4 different classes that I am attempting to replace, and want to locate every place in the source they are allocated (heap + stack).

Unfortunately, due to a poor include structure, Visual Studio’s “search entire solution” feature cannot be trusted, so I have resorted to a manual search within the source files.

What I believe is sufficient:

"new CLASS1(" with any combination of spaces between the three tokens there for heap and
"^CLASS2" where I’m trying to say the Class name starts at the beginning of the line (excluding spaces) for stack allocation.

For stack allocation, [^a-zA-Z] CLASS3 [a-zA-Z]+ was attempted, but I’m not fluent in regex so wanted to run this by SO. For heap, just that string above was tried, but I know that a simple extra spacing would break that pattern so I know it is incorrect.

Can anyone come up with a better matcher or even an entirely better way to go about the problem?

Thank you,

AK

  • 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-06-15T16:30:49+00:00Added an answer on June 15, 2026 at 4:30 pm

    Make the constructors private and you’ll get an error message for every attempt to create the object.

    Make a private new() operator to do the same trick with heap allocations.

    Edit: watch out for the code INSIDE the class implementation (including static methods) creating instances of itself. Calling a private constructor from such context is valid and won’t trigger an error. Also watch out for friend classes/functions.

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

Sidebar

Related Questions

We have a Scala project with few source files (in Scala and Java) and
I have quite a few libraries and models that get loaded into a controller,
A question that seems to have quite a few options for Python, but none
I'm currently using QDataStream to serialize my classes. I have quite a few number
We are developing a closed-source proprietary product that uses quite a few open source
I have a project that I have been working on for a few days
I have a maven project with quite a few submodules. What I am looking
I'm having quite a few troubles pointing at a custom directory for Scala source-files
I have quite a few buttons in my application, they vary in sizes based
I have quite a few situations where I have database structures similar to: TABLE

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.